subdirs without trailing slash

Dick Middleton dick at
Sun Jul 19 02:33:14 MSD 2009

I want to make the following equivalent:

The first two work OK but the last one I can't get to work.  With the 
following it gives 404 error in the logs but the browser says "No input file 
specified." :

   location ~* ^/(web)?mail/.+\.(jpg|jpeg|gif|css|png|js|ico|html)$ {
     root  /var/www;

   location ~ ^/(web)?mail {
     root  /var/www;
     index index.php;
     fastcgi_index index.php;
     include my_fastcgi_params;
     fastcgi_pass localhost:8888;

I've tried all sorts of variations of this including trying to rewrite the 
full uri in the last case.

The my_fastcgi_params include

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;

What is the recommended way to configure this?


More information about the nginx mailing list