# /usr/local/nginx/conf/nginx.conf user nginx; worker_processes 2; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 15; gzip on; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; include conf.d/*.conf; server { listen 80; server_name _; access_log /var/logs/rainmap/access.log; root /var/local/rainmap/public; # deny listing of dot-files location ~ /\. { deny all; } # serve static files location ~* \.(jpg|jpeg|gif|css|png|js|ico)$ { access_log off; expires 30d; } # forward the rest to Apache location / { access_log off; proxy_pass http://localhost:8080; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } }