Sep 162010
 

If you set

   location /mail/ {
       fastcgi_pass localhost:8888;
       ...
   }

and request “/mail” then nginx will return external redirect to “/mail/”.
If you do not want the redirect, then

   location = /mail {
       fastcgi_pass   localhost:8888;
       fastcgi_param  SCRIPT_FILENAME    $document_root/index.php;
       fastcgi_param  SCRIPT_NAME        /index.php;
       root           /var/www;
   }

   location /mail/ {
       fastcgi_pass   localhost:8888;
       fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
       fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
       fastcgi_index  index.php;
       root           /var/www;
   }

or set

server_name_in_redirect off;

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

*