> In your first configuration try_files is a nop, as > it's defined at > server level and will be only used if request > doesn't match any of > locations defined. That explains it then. Thank you very much Maxim! @Edho there was no /var/index.html because I was forcing a 404 in this snippet.by whiskybar - Nginx Mailing List - English
I'm afraid I have to disagree on this. That was my guess before I tried that too. Here's the relevant part of the log for my first configuration, with `try_files $uri =404` only: 2012/06/25 21:34:22 30604#0: *335710 open index "/var/index.html" 2012/06/25 21:34:22 30604#0: *335710 stat() "/var/index.html" failed ( 2: No such file or directory) And btw, this is on Nginby whiskybar - Nginx Mailing List - English
Why is it my first configuration returns 403 while my second configuration returns 404? I looked into logs and it seems my first configuration triggers the index module which is set to the default index.html, finds nothing and returns 403. Why isn't the =404 triggered? And why is the index module triggered at all? server { root /var; try_files $uri =404; location / { } }by whiskybar - Nginx Mailing List - English
Hi Francis, it must have been for my bad understanding of "if the header match name of server_name directive". I did not understand what "name of server_name directive" was -- of course, mysite.com matches the directive, you are right! Then, it was the change of the server_name_in_redirect's default in 0.8.48 in addition to that - as you said. I'm running 0.9.x everywherby whiskybar - Nginx Mailing List - English
Thank you all. Your solutions seem quite elegant. Just a note, I was hoping for something I can do inside the server only declaration, just like I can do with the opposite redirection mysite.com --> www.mysite.com: server { server_name www.mysite.com mysite.com; if ($host !~* www\..*) { rewrite ^(.*)$ http://www.$host$1 permanent; } On the other hand, I feby whiskybar - Nginx Mailing List - English
Hello everyone, I used to use the following trick to cut the initial www. from the address so that www.mysite.com would redirect to mysite.com: server { server_name mysite.com www.mysite.com; if ($host ~* www\..*) { rewrite ^(.*)$ $1 permanent; } Well, this method no longer works. I do not know when it stopped working but I will get "The page isn't redirby whiskybar - Nginx Mailing List - English
Hello, this is the first time I wanted to cache FastCGI responses from the upstream servers. I have set up everything like in the documentation examples but I got Reloading nginx configuration: : the size 10485760 of shared memory zone "obrazek" conflicts with already declared size 0 in /etc/nginx/nginx.conf:41 configuration file /etc/nginx/nginx.conf test failed on nginby whiskybar - Nginx Mailing List - English