Skip to content
Snippets Groups Projects
nginx.conf 977 B
Newer Older
  • Learn to ignore specific revisions
  • Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    worker_processes  auto;
    
    error_log  /var/log/nginx/error.log warn;
    
    pid        /tmp/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    
    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;
    
        keepalive_timeout  65;
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
        keepalive_requests 65;
    
    
        # Gzip conf
        gzip on;
        gzip_vary on; # tells proxies to cache both gzipped and regular versions of a resource
        gzip_min_length 256; # taille minimale du fichier à compresser
        gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
        include /etc/nginx/conf.d/*.conf;
    
        # Max Body Size
        client_max_body_size 2M;
    
    }