datahuborg/datahub

View on GitHub
provisions/nginx/nginx.conf

Summary

Maintainability
Test Coverage
user  nginx;
worker_processes  5;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
    accept_mutex on; # set to 'on' if nginx worker_processes > 1
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    # Allow uploads up to 2GB in size.
    # This may need more tweaking, like explicitly saving uploaded files to a
    # temporary directory rather than keeping them in memory.
    client_max_body_size 2048m;

    keepalive_timeout  65;

    gzip  on;
    # text/html is always compressed
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    include /etc/nginx/conf.d/*.conf;
}