location workflow question
Maxim Dounin
mdounin at mdounin.ru
Sat Feb 21 03:58:06 MSK 2009
Hello!
On Sat, Feb 21, 2009 at 01:24:38AM +0100, euhost.net - matevz sernc-urban wrote:
> Hello
>
> i have here a configuration, where a request to
> /forum/viewforum-18-bla.php is not parsed by php.
>
> My Question is: why doesnt the "location ~ .php$" get's executed after
> the "location ^~ /forum/" is finished?
Any reason why it should? URI in question is mathched by
"location ^~ /forum/" and regex location processing forbidden
after this location (note ^~).
Maxim Dounin
>
> server is nginx 0.7.35 with fastcgi/php-cgi.
>
> Here is my simplified non-working config file:
>
> server {
> listen 192.168.1.2:80;
> server_name www.domain.com;
>
> location / {
> root html;
> index index.html index.php;
> }
>
> location ^~ /forum/ {
> rewrite ^/forum/viewforum-18-bla.php$
> /forum/viewforum.php?id=18 last;
> }
>
> location ~ .php$ {
> fastcgi_pass 127.0.0.1:8888;
> include fastcgi_params;
> }
>
> }
>
> my config would work, if i duplicate the fastcgi_pass directive in
> "location ^~ /forum/". But is this duplication really needed?
>
> Thanks for an advice.
>
> And keep up the good work with nginx!
> Matevz Sernc-Urban
>
More information about the nginx
mailing list