Skip to content

Instantly share code, notes, and snippets.

@sanatgersappa
Created November 13, 2012 04:07
Show Gist options
  • Save sanatgersappa/4063871 to your computer and use it in GitHub Desktop.
Save sanatgersappa/4063871 to your computer and use it in GitHub Desktop.
nginx conf
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost, gopher.cloudapp.net;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
fastcgi_pass localhost:9999;
include fastcgi_params;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment