Skip to content

Instantly share code, notes, and snippets.

@holys
Forked from anonymous/stdin.txt
Created April 28, 2013 11:18
Show Gist options
  • Save holys/5476611 to your computer and use it in GitHub Desktop.
Save holys/5476611 to your computer and use it in GitHub Desktop.
# test environment
server{
listen 80;
server_name example.com;
access_log /home/david/Gone/Work/zcms/logs/access_log;
error_log /home/david/Gone/Work/zcms/logs/error_log;
# root /home/david/Gone/Work/zcms/contents/viewer;
location / {
proxy_set_header HOST $host;
rewrite ^/themes/(.*) /themes/$1 break;
if ($host = viewer.example.com){
rewrite ^/(.*) /viewer/$1 break;
}
if ($host = docs.example.com){
rewrite ^/(.*) /edodocs.com/$1 break;
}
if ($host = pm.example.com){
rewrite ^/(.*) /edoprojects.com/$1 break;
}
if ($host = example.com){
rewrite ^/(.*) /everydo.com/$1 break;
}
proxy_pass http://localhost:6543;
proxy_redirect off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment