Skip to content

Instantly share code, notes, and snippets.

@mutle
Created June 26, 2009 14:30
Show Gist options
  • Save mutle/136529 to your computer and use it in GitHub Desktop.
Save mutle/136529 to your computer and use it in GitHub Desktop.
location / {
include /etc/nginx/common/proxy.conf;
if (-f $document_root/system/cache$uri.html) {
rewrite ^(.*)$ /system/cache$1.html;
break;
}
if (-f $document_root/system/cache$uri/index.html) {
rewrite ^(.*)$ /system/cache$1/index.html;
break;
}
if (!-f $request_filename) {
proxy_pass http://upstream;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment