Skip to content

Instantly share code, notes, and snippets.

@mcmoyer
Created July 21, 2010 18:03
Show Gist options
  • Save mcmoyer/484849 to your computer and use it in GitHub Desktop.
Save mcmoyer/484849 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name cms.my.site.com;
root /srv/www/mysite/current/public;
passenger_enabled on;
rails_env production;
client_max_body_size 50m;
}
server {
listen 80;
server_name my.site.com;
root /srv/www/mysite/current/public;
passenger_enabled on;
rails_env production;
if (-f $document_root/cache$uri.html) {
rewrite (.*) /cache$1 break;
}
if (-f $document_root/cache/$uri/index.html) {
rewrite ^/$ /cache/index.html last;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment