help with my config

Igor Sysoev is at rambler-co.ru
Wed Feb 13 22:53:07 MSK 2008


On Wed, Feb 13, 2008 at 10:22:10AM -0800, Alex Egg wrote:

> Here's the link:
> 
> http://pastie.caboo.se/151627

I prefer this configuration:

server {

     ...

     root /u/apps/asdf/current/public;

     if (-f $document_root/system/maintenance.html) {
         rewrite  ^(.*)$  /system/maintenance.html last;
     }

     if (-f $request_filename.html) {
         rewrite (.*) $1.html   last;
     }

     location / {
         index   index.html;
         error_page   404 = @mongrel;
     }

     location @monrgel {
         proxy_pass  http://monrgel;
         proxy_set_header   ...
         ...
     }

     location ^~ /accounts {
         internal;
         root /u/apps/asdf/shared;
     }

     location ~* \.(js|css|jpg|jpeg|gif|png|swf)$ {
         expires      1M;
     }

     error_page   500 502 503 504  /500.html;
     location = /500.html {
          root   /u/apps/asdf/current/public;
     }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list