Welcome! Log In Create A New Profile

Advanced

Re: try_files does not have any effect on existing files

Francis Daly
February 19, 2017 02:42PM
On Sun, Feb 19, 2017 at 12:42:11PM -0500, weheartwebsites wrote:

Hi there,

> This means, I can not for example overwrite an existing physical file
> location with a config like this:
>
> location / {
> try_files /$host$uri /index.php
> }
>
> Since if $uri exists under the root/alias it will be served directly without
> triggering that try_files directive.

Can you give one specific example here, please?

What request do you make; what response to do want; what response do
you get instead?

I imagine it will be something like "I request /abc; I want the contents
of the file /usr/local/nginx/html/localhost/abc; but I get the contents
of the file /usr/local/nginx/html/abc instead".

But it will be good to be clear on what you expect to happen.

Thanks,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

try_files does not have any effect on existing files

weheartwebsites February 19, 2017 12:42PM

Re: try_files does not have any effect on existing files

Francis Daly February 19, 2017 02:42PM

Re: try_files does not have any effect on existing files

weheartwebsites February 19, 2017 05:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
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