Welcome! Log In Create A New Profile

Advanced

alias/try_files bug?

Brian Gernhardt
February 03, 2012 01:42AM
My server is running Ubuntu 11.10. I've replicated this bug with both the nginx-light package (1.0.5) and nginx-1.0.10 (compiled via passenger).

Here's a shortened version of my site configuration:

--- 8< ---

server {
location /forum/ {
alias /srv/www/forum/;
index index.php index.html index.htm;

location ~ \.php$ {
# Try to stop bad PHP requests, as per wiki
try_files $uri =404;

fastcgi_pass php;
}
}
}

--- 8< ---

This configuration returns 404 for _all_ PHP requests, even for files that exist. (There is normally a "location /" block that points to a CMS. But removing it still has gives the same error.)

If I remove the try_files, the forum works. If I remove the alias and use "root /srv/www" instead, it works. Only when I use try_files and alias does it fail.

This looks like a bug to me, but I'm not familiar enough with the nginx source to track it down.

~~ Brian

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

alias/try_files bug?

Brian Gernhardt 1393 February 03, 2012 01:42AM

Re: alias/try_files bug?

Maxim Dounin 556 February 03, 2012 06:50AM

Re: alias/try_files bug?

Edho Arief 559 February 03, 2012 06:58AM

Re: alias/try_files bug?

Maxim Dounin 491 February 03, 2012 08:36AM

Re: alias/try_files bug?

Edho Arief 502 February 03, 2012 08:38AM

Re: alias/try_files bug?

Edho Arief 464 February 03, 2012 08:42AM

Re: alias/try_files bug?

Maxim Dounin 924 February 03, 2012 01:06PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 296
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready