mmagic word in nginx?
Maxim Dounin
mdounin at mdounin.ru
Mon Mar 2 02:17:37 MSK 2009
Hello!
On Sun, Mar 01, 2009 at 11:47:40PM +0100, Daniel Epi wrote:
> Hi,
>
> I'm using nginx 0.6.32 on my server and I ran into misterious an issue.
> One of my client is istalled the Drupal CMS and noticed that one part of
> the portal is not working.
>
> When you enter somedomain/mypage it works great, but when you try to
> reach somedomain/naptar nginx gives a 404 error.
>
> I've managed to reproduce the issue using the same rewrite settings:
> location / {
> root /home/{domain_here}/httpdocs;
> index index.php index.html;
>
> if (!-e $request_filename) {
> rewrite ^/(.*)$ /index.php?q=$1 last;
> break;
> }
> }
>
> It strange that the error only occures when I try to reach
> somedomain/naptar
> The word naptar - calendar in Hungarian BTW - does not exist in my
> config file. There is no file/directory by this name in the server.
>
> Any idea?
Probably something like
location ~ ^(.*).(jpg|gif|tar|gz|...)$ {
...
}
exists in your config file to catch static. As you can see the
above regexp is wrong (missing "\", not even talking about
unneeded "^(.*)") and will catch "/<somethig>tar" as well as
"/<something>.tar".
Maxim Dounin
More information about the nginx
mailing list