Skip to content

Instantly share code, notes, and snippets.

@morkevicius
Created October 16, 2015 13:54
Show Gist options
  • Save morkevicius/c25e52e3a6158546ebb7 to your computer and use it in GitHub Desktop.
Save morkevicius/c25e52e3a6158546ebb7 to your computer and use it in GitHub Desktop.
user saulius saulius;
worker_processes 4;
error_log /var/log/nginx/nginx.log debug;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
}
http {
passenger_log_level 6;
server_tokens off;
include fastcgi.conf;
include mime.types;
default_type application/octet-stream;
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
## Proxy
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
## Compression
gzip on;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
### TCP options
tcp_nodelay on;
tcp_nopush on;
keepalive_timeout 65;
sendfile on;
#### Passenger
include passenger.conf;
include /etc/nginx/sites-enabled/*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment