Non-root install of Wordpress in an already running nginx site

Ian M. Evans ianevans at digitalhit.com
Wed Apr 11 00:22:45 UTC 2012


On Tue, April 10, 2012 8:02 pm, Edho Arief wrote:
> location /ournewblog/ {
>   root ...;
>   try_files $uri /ournewblog/index.php?q=$uri;
>   location ~ \.php$ {
>     fastcgi_pass ...
>     ...
>   }
> }
>
> Hopefully you don't have regex based location on server { } block.
> Otherwise you can try location ~ ^/ournewblog/ instead.

I've always been a bit unsure of handling nginx locations so how can I
tell if I have a "regex based location"?

Most of my locations are like:

location / {
index index.shtml index.php;
}
location ~ \.(shtml|php|inc)$ {
fastcgi_pass 127.0.0.1:10004;
}
# start of extensionless stuff
location ~ ^/(bunch|of|site|sections)(/.*$|$) {
...
}
location ~ /(more|extensionless|sections)(/|$) {
...
}

Thanks.



More information about the nginx mailing list