Welcome! Log In Create A New Profile

Advanced

Re: Separate location for files served by php-fpm

Francis Daly
May 24, 2023 01:26PM
On Thu, May 18, 2023 at 09:14:42PM -0700, Palvelin Postmaster via nginx wrote:

Hi there,

> My goal is to serve only requests which include URI /files/hash/*
> using a separate location block. Everything else should be served by
> the default location block I included in my previous message.

Untested, but would

location ^~ /files/hash/ {
fastcgi_pass php74;
fastcgi_param SCRIPT_FILENAME /var/your-php-script.php;
expires 10d;
}

meet what your goal is?

Adjust the fastcgi_param value to whatever your fastcgi server needs.

The important part is probably the "location" line that matches
all-and-only these requests.

Good luck with it,

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

Separate location for files served by php-fpm

Palvelin Postmaster via nginx May 08, 2023 02:50PM

Re: Separate location for files served by php-fpm

Palvelin Postmaster via nginx May 15, 2023 06:48PM

Re: Separate location for files served by php-fpm

Francis Daly May 15, 2023 08:16PM

Re: Separate location for files served by php-fpm

Palvelin Postmaster via nginx May 19, 2023 12:16AM

Re: Separate location for files served by php-fpm

Francis Daly May 24, 2023 01:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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