Skip to content

Instantly share code, notes, and snippets.

@awt
Created August 4, 2008 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awt/3925 to your computer and use it in GitHub Desktop.
Save awt/3925 to your computer and use it in GitHub Desktop.
upstream classic_upstream {
fair;
server 127.0.0.1:5500;
}
server {
listen 80;
server_name www.mywebsite.com website.com;
root /data/classic/current/public;
access_log /var/log/engineyard/nginx/classic/access.log main;
error_log /var/log/engineyard/nginx/classic/error.log notice;
include /etc/nginx/common/servers.conf;
include /etc/nginx/servers/classic.rewrites;
#include /etc/nginx/servers/classic/custom.locations.conf;
location / {
include /etc/nginx/common/proxy.conf;
if ($request_method = POST) {
proxy_pass http://classic_upstream;
break;
}
if (!-f $request_filename) {
proxy_pass http://classic_upstream;
break;
}
}
location = /500.html {
root /data/classic/current/public;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment