Alias

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.

Marcos N.
+55 44 9918-8488

On Fri, Dec 11, 2009 at 2:32 PM, Igor S. [email protected] wrote:

domainname.com/_qi/phpinfo.php
  location / {
    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

On Fri, Dec 11, 2009 at 01:15:13AM -0200, Marcos N. wrote:

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;
}
}

server {
server_name domain2.name;

root  /var/www/domain2.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;
}
}


Igor S.
http://sysoev.ru/en/