SatelliteWP / rocket-nginx

Rocket-Nginx is a Nginx configuration that makes WP-Rocket even faster by serving static pages directly without loading WordPress or PHP.
MIT License
579 stars 129 forks source link

Doesn't work on localhost when port is included in the url #183

Closed saberkarimi closed 1 year ago

saberkarimi commented 1 year ago

Hi. I am using the latest version, I am working on my website on localhost via WSL (windows subsystem for Linux). My homepage URL is: https://localhost:83 I need to include the port because that is how Nginx works on WSL.

This is what I get in debug as file location: X-Rocket-Nginx-File: /var/www/imp/wp-content/cache/wp-rocket/localhost:83//fr///index.html X-Rocket-Nginx-Reason: File not cached X-Rocket-Nginx-Serving-Static: MISS

You see the port # is included in the path. But in my "/wp-content/cache/wp-rocket/" folder, only "localhost" is created as folder. No "localhost:83" and therefore static files can not be served.

Any help would be appreciated Kind regards

maximejobin commented 1 year ago

That is interesting.

I've never tested with a port... so good catch.

The question now is : is it worth fixing this? Clearly "localhost" is for development purposes and not for production.

Why do you need that use case to work?

saberkarimi commented 1 year ago

You are right this is not worth fixing. I moved this specific project to a droplet. All good.

Thanks