Skip to content

Instantly share code, notes, and snippets.

@gbishop
Created April 7, 2010 20:38
Show Gist options
  • Save gbishop/359418 to your computer and use it in GitHub Desktop.
Save gbishop/359418 to your computer and use it in GitHub Desktop.
nginx sites-avaiable file for ubuntu
# Configuration for local development for the unc open web.
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/localhost.access.log;
location / {
root /var/www;
index index.html index.htm;
}
location /data {
proxy_pass_header Server;
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_pass http://gb.cs.unc.edu/data;
}
location /jsonic { # not yet tested
proxy_pass_header Server;
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_pass http://gb.cs.unc.edu/jsonic;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment