Welcome! Log In Create A New Profile

Advanced

Re: NGINX PHP FPM - Download prompt when accessing directories

Francis Daly
August 31, 2020 04:02AM
On Sun, Aug 30, 2020 at 11:15:03PM +0000, Laura Smith wrote:

Hi there,

> > > location ^~ /administrator/ {
> >
> > will handle all requests that start with /administrator/; that location
> > does not do any special handling of php requests; all it will do is
> > serve files from the filesystem.

> But then is that not the case for my 'location / {' as well ? That section also does not do any special handling of php requests and yet the php works ?
>

You have:

==
location ^~ /administrator/ {

location / {

location ~ [^/]\.php(/|$) {
fastcgi_pass
==

It is the case that any request that is handled in the second location
will be served from the filesystem.

But it is not the case that any request that starts with / will be
handled in the second location.

The various characters after the word "location" change how you have
asked nginx to handle different requests.

http://nginx.org/r/location has more details.

Cheers,

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

Re: NGINX PHP FPM - Download prompt when accessing directories

Francis Daly August 30, 2020 07:10PM

Re: NGINX PHP FPM - Download prompt when accessing directories

Francis Daly August 31, 2020 04:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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