Non-root install of Wordpress in an already running nginx site
Edho Arief
edho at myconan.net
Wed Apr 11 00:26:52 UTC 2012
2012/4/11 Ian M. Evans <ianevans at digitalhit.com>:
> 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;
> }
this is regex based location block. It gets higher priority when
accessing /ournewblog/index.php .
You need location ~ ^/ournewblog/ instead and put it as the first
location block (before other locations).
More information about the nginx
mailing list