Skip to content

Instantly share code, notes, and snippets.

@lajunta
Created October 23, 2013 06:55
Show Gist options
  • Save lajunta/7113752 to your computer and use it in GitHub Desktop.
Save lajunta/7113752 to your computer and use it in GitHub Desktop.
#######################################################
### Calomel.org /etc/nginx.conf BEGIN
#######################################################
pid /var/run/nginx.pid;
#user nginx nginx;
user nobody nogroup;
worker_processes 2;
events {
use epoll;
worker_connections 1024;
}
http {
## MIME types
include /etc/nginx/mime.types;
# default_type application/octet-stream;
## Size Limits
client_body_buffer_size 64K;
client_header_buffer_size 64K;
client_max_body_size 1G;
large_client_header_buffers 1 1k;
## Timeouts
#client_body_timeout 90;
#client_header_timeout 90;
client_body_timeout 10;
client_header_timeout 10;
# expires 10d;
keepalive_timeout 10;
send_timeout 10;
#client_header_timeout 10m;
#client_body_timeout 10m;
#send_timeout 10m;
## General Options
ignore_invalid_headers on;
keepalive_requests 100;
recursive_error_pages on;
sendfile on;
server_name_in_redirect off;
server_tokens off;
## TCP options
tcp_nodelay on;
tcp_nopush on;
## Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.0;
gzip_min_length 0;
gzip_types application/x-javascript text/plain text/css image/x-icon application/x-perl application/x-httpd-cgi;
gzip_proxied any;
gzip_vary on;
## Log Format
log_format main '$remote_addr $host $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
## Proxy options
# proxy_buffering on;
# proxy_cache_min_uses 3;
# proxy_cache_path /usr/local/nginx/proxy_temp/ levels=1:2 keys_zone=cache:10m inactive=10m max_size=1000M;
# proxy_cache_valid any 10m;
# proxy_ignore_client_abort off;
# proxy_intercept_errors on;
# proxy_next_upstream error timeout invalid_header;
# proxy_redirect off;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_connect_timeout 60;
# proxy_send_timeout 60;
# proxy_read_timeout 60;
include conf.d/dljy.conf;
include conf.d/kpy.conf;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
#server {
# add_header Cache-Control public;
# listen 80;
# server_name kpy.lwqzx.net;
# access_log /var/log/kpy.access.log main;
# root /usr/local/railsites/dljy/public;
# #root /var/www/kpylwqzx;
# index index.html;
# location / {
# proxy_pass http://dljyunicorn;
# }
# }
}
#
#######################################################
### Calomel.org /etc/nginx.conf END
#######################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment