Mastering Nginx

(Ron) #1
Chapter 2

[ 39 ]

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 http://www.example.com;


location / {


try_files $uri $uri/ @mongrel;


}


location @mongrel {


proxy_pass http://127.0.0.1:8080;


}


}


}

Free download pdf