Francis Daly
May 15, 2023 08:16PM
On Mon, May 15, 2023 at 12:46:14PM -1000, Palvelin Postmaster via nginx wrote:
> > On 8. May 2023, at 8.49, Palvelin Postmaster via nginx <nginx@nginx.org> wrote:

Hi there,

> > I use php-fpm together with nginx.
> >
> > My PHP app serves files which have hashed filenames and no filename extension from a specific subdirectory url, e.g /files/hash/31b4ba4a0dc6536201c25e92fe464f85
> >
> > I would like to be able to set, for example, a separate ’expires’ value to these files with nginx (using a separate location block?). Is that achiavable?

In principle, yes. So long as the requests use different urls (excluding
query string).

In practice: from the words here, it is not entirely clear to me what
your overall application is doing.

Maybe you can have a location{} dedicated to these file-requests; or maybe
it would be "cleaner" for the php side to add the extra Expires header.

Can you show one or two sample requests that are made to nginx that you
do want to have this extra Expires header; and one or two that you do
not want to have this extra Expires header?

The aim is to come up with a location{} block that matches only the
requests that you want, if that is possible.

Thanks,

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: 233
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