situation with friendly urls

Francis Daly francis at daoine.org
Sun Apr 9 11:26:49 UTC 2023


On Sat, Apr 08, 2023 at 11:29:25PM -0400, Rick Gutierrez wrote:

Hi there,

> Hi here again, I have tried different configurations but I cannot get
> the project website to load correctly.

When you say that it does not load correctly, can you show one specific
request that does not get the response that you want it to get? That
should make it easier to identify where things are going wrong.

For what it is worth: the debug log that you show, does not appear to
come from a system that is using the configuration that you show.

So it is possible that the configuration that you are changing, is not
the one that the running nginx is actively using.

(Or maybe you are only showing a part of the configuration that is not
used in this request?)

The debug log does not show the locations /assets/ or /css/ or the like;
it mainly shows locations related to the third-party pagespeed module.

>From what you describe, the browser should make a request to the "front"
nginx server, which should use its proxy_pass config to make a request
to the "backend" nginx server, which should then do whatever it is
configured to do.

It is not clear to me what request is being made to the "front" server,
that is not being handled as you want it to be.

> location /assets/ {
> 
>    alias /var/www/sites/netsoluciones.com/htdocs/assets/;
> 
> }

> https://pastebin.com/JMP3n7iB

That seems to show a request for
/assets/images/empresa/x26910210_152867885365030_7535289409698400565_o.png.pagespeed.ic.B57rrxzkqD.webp
that is handled in the regex location ~
".*\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+", and not in the
prefix location /assets/.

> any idea , suggestion?

More information.

It looks like you want the "/assets/" request to be handled by serving a
file from the filesystem; but that seems unrelated to php, friendly urls,
and two languages.

So if you can describe how you want one specific request to be handled,
and can show how it actually is handled, maybe the first place where
those two things differ can be identified.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list