Skip to content

Instantly share code, notes, and snippets.

@mlangenberg
Created August 26, 2008 17:51
Show Gist options
  • Save mlangenberg/7305 to your computer and use it in GitHub Desktop.
Save mlangenberg/7305 to your computer and use it in GitHub Desktop.
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_redirect http://localhost/ $scheme://$http_host/;
server {
listen 80;
server_name sandbox.phusion.nl;
root /u/apps/sandbox/current/public;
location / {
proxy_redirect http://localhost:1234/ $scheme://$http_host/;
if (!-f $request_filename) {
proxy_pass http://localhost:1234;
break;
}
if ($request_method !~ "GET|HEAD") {
proxy_pass http://localhost:1234;
break;
}
}
}
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_redirect http://localhost/ $scheme://$http_host/;
server {
listen 80;
server_name sandbox.phusion.nl;
root /u/apps/sandbox/current/public;
location / {
proxy_redirect http://localhost:1234/ $scheme://$http_host/;
if (!-f $request_filename) {
proxy_pass http://localhost:1234;
break;
}
if ($request_method != GET) {
proxy_pass http://localhost:1234;
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment