Alias does not work with php

Edho Arief edho at myconan.net
Sat Dec 17 17:38:15 UTC 2011


On Sun, Dec 18, 2011 at 12:21 AM, tapir <nginx-forum at nginx.us> wrote:
> can I then use other scripts from /path/to/otherscript
>
> my document root looks like this:
>
> phpbb/
> wordpress/
> phpmyadmin/
> piwik/
>
> but I only want wordpress to be accessible from the mydomain.com. Others
> should be accessible from mydomain.com/phpbb and so on...
>
> maybe I should have asked this from the start :) how can I achieve this?
>

location /phpbb {
  root /some/where; #actual phpbb installation in /some/where/phpbb
  location ~ \.php$ {
    fastcgi_pass ...;
    ...
  }
}
location /wordpress {
  root /some/where_else; #actual wordpress installation in
/some/where_else/wordpress
  location ~ \.php$ {
    ...
  }
}
...
location / {
  root /some/where_else/wordpress;
  location ~ \.php$ {
    ...
  }
}

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



More information about the nginx mailing list