Full sample configuration
What follows is a sample configuration file, including the different sections discussed in this chapter. Please note that this should not be copy-pasted and used as-is. It will most likely not fit your needs. This code is shown here only to give an idea of the structure of a complete configuration file:
user www; worker_processes 12; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { use /dev/poll; worker_connections 2048; } http { include /opt/local/etc/nginx/mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; server_names_hash_max_size 1024; server { listen 80; return 444; } server { listen 80; server_name www.example.com; location / { try_files $uri $uri/ @mongrel; } location @mongrel { proxy_pass http://127.0.0.1:8080...