alias

Edho P Arief edhoprima at gmail.com
Fri Dec 11 10:54:15 MSK 2009


On Fri, Dec 11, 2009 at 2:32 PM, Igor Sysoev <igor at sysoev.ru> wrote:
> On Fri, Dec 11, 2009 at 01:15:13AM -0200, Marcos Neves wrote:
>
>> I want to create a special url that makes some scripts available to all
>> sites.
>>
>> All my sites are located at /var/www/<domain.name>/
>>
>> And I have a directory at /var/www/_qi/ with my special scripts.
>>
>> I want that on every domain, when access this:
>> domainname.com/_qi/phpinfo.php
>>
>> it should run the file /var/www/_qi/phpinfo.php
>>
>> As you can see, php must still works.
>
> server {
>    server_name  domain1.name;
>
>    root  /var/www/domain1.name;
>
>    location / {
>    }
>
>    location ^~ /_qi/ {
>        root  /var/www/;
>        fastcgi_pass   ...;
>        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
>        include        fastcgi_params;
>    }
>
>    location ~ \.php$ {
>        fastcgi_pass   ...;
>        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
>        include        fastcgi_params;
>    }
> }

or create a separate file and include that in every server block.

-- 
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the nginx mailing list