user nobody nobody; worker_processes 5; error_log logs/error.log; pid logs/nginx.pid; worker_rlimit_nofile 8192; events { worker_connections 4096; } http { include mime.types; include /etc/nginx/proxy.conf; index index.html index.htm; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $status ' '"$request" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; tcp_nopush on; gzip on; server_names_hash_bucket_size 128; # this seems to be required for some vhosts server { listen 80; gzip on; gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype; gzip_min_length 1000; location ~ ^/(api|admin)/ { proxy_pass http://back; } location / { root /var/www/html; try_files $uri $uri/ /; gzip_static on; } location ~ ^/\. { deny all; } } }