Created
April 3, 2011 15:46
-
-
Save carlosfilho88/900508 to your computer and use it in GitHub Desktop.
Nginx basic conf file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 4; | |
worker_cpu_affinity 0001 0010 0100 1000; | |
worker_rlimit_nofile 8192; | |
events { | |
use epoll; | |
worker_connections 8192; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
## Size Limits | |
client_body_buffer_size 32k; | |
client_header_buffer_size 32k; | |
client_max_body_size 512k; | |
large_client_header_buffers 1 1k; | |
output_buffers 4 32k; | |
postpone_output 1460; | |
## Timeouts | |
client_body_timeout 60; | |
client_header_timeout 60; | |
keepalive_timeout 60 60; | |
send_timeout 60; | |
## General Options | |
ignore_invalid_headers on; | |
#limit_zone gulag $binary_remote_addr 3m; | |
#limit_conn slimits 50; | |
#limit_conn gulag 50; | |
recursive_error_pages on; | |
sendfile on; | |
server_name_in_redirect off; | |
server_tokens off; | |
server_names_hash_bucket_size 128; # this seems to be required for vhosts | |
more_set_headers 'Server: HAHAHA'; | |
## TCP options | |
tcp_nodelay on; | |
tcp_nopush on; | |
## Compression | |
gzip on; | |
gzip_buffers 16 8k; | |
gzip_comp_level 5; | |
gzip_http_version 1.0; | |
gzip_min_length 0; | |
gzip_disable "MSIE [1-6].(?!.*SV1)"; | |
gzip_vary on; | |
gzip_proxied any; | |
gzip_types text/plain text/css text/javascript application/json application/x-javascript text/xml application/xml application/xml+rss application/atom+xml; | |
log_format NAME '$proxy_add_x_forwarded_for - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
## Encoding | |
charset iso-8859-1; | |
geoip_city /etc/nginx/GeoLiteCity.dat; | |
include upstream; | |
server { | |
listen 80; | |
server_name yourmuninstats.localhost; | |
location / { | |
auth_basic "Restricted"; | |
auth_basic_user_file /etc/nginx/.htpasswd/passwd; | |
root /var/cache/munin/www; | |
} | |
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error.html; | |
location /error.html { | |
root /etc/nginx; | |
internal; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment