Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
by Talented

A WordPress plugin is producing a bunch of 404s which you can see here in "Avoid bad requests" -- https://gtmetrix.com/reports/licencedbreeders.uk/palukN2Z

I am being told the following by the author -- "Its a misconfiguration of your hosting server.  PHP's "PATH_INFO" functionality is not working for URLs that end in .js, with causes URLs suchs as the below to lead to a 404:



The thing is that the Nginx server needs to be configured as detailed here:

https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/#connecting-nginx-to-php-fpm "

As I couldn't find anything in here about PHP's "PATH_INFO" functionality, or in the documentation, I thought I would run it by you before trying what he suggests.


by Expert
By default, all PHP Webinoly sites created from version 1.12.0 have support for PATH_INFO, this feature can be disabled in Webinoly configuration file. WordPress sites do not have support for PATH_INFO as it is not required.

1 Answer

0 votes
by Expert

Hi Terence,

Nice to see you here!

Practically, any WordPress site use JS files, so the questions should be, why only this plugin JS requests are failing?

I have to admit that I was not aware of this Nginx suggested PHP configuration, the thing is that I can not test it because JS requests are working fine as expected in all my sites, but I promise I will take the time to test it and study it the next time we do an update to the Webinoly server stack (scheduled: v1.12.0 later in july).

Would be great if you try it and then give us your feedback about the advantages of using this configuration.


by Talented
It's a bit like the doctor's waiting room in here, only nicer. You come in with something that pains you, but when you leave, somehow it always gets fixed.

By trial and error I just found out that without PATH_INFO support you cannot use the plugins "Remove query string setting from processed resources" option.

I've just disabled this, and now those "bugs" are fixed.

I guess that explains the anomaly and gives the plugin's editor more to think about, than it does you.

And for my part, I don't feel like I want to start messing with the NginX configuration, unless I really need to, especially if you think its OK, doctor!

by Expert
Glad you solved your issue!

Either way, I have taken note to study it and see if there is anything we can take to improve our configuration.

Thanks, Terence!
by Talented
A related but separate question. The author of the PhastPress plugin has offered to test out the modifications to the NginX config on my server and then share his research with you. How do I add his SSH key to my server?  I tried adding it at DigitalOcean but that doesn’t seem to work.

Many thanks.
by Expert

Just add the public key in the authorized keys file ~/.ssh/authorized_keys and then I'm not sure but maybe you will need to restart the SSH service.

by Talented
Thanks, I had already figured I could do that -- I just wasn't sure if Webinoly had a special way of handling it -- then I reloaded sshd.service, but I haven't heard back yet if worked or not.
by Expert
These features are already in our roadmap and planned maybe for the next year, we will have some multi-server functionalities and then we will integrate these SSH things.

Also, the PhastPress guy has submitted a pull to request to Webinoly GitHub repo.

by Talented
He seems like a smart guy and PhastPress is pretty amazing. It does a 99% perfect job of speeding a fairly complex WooCommerce site. And it produces probably the best optimisation results I have ever seen — automatically!
by Expert
As I said in the comment I made in the pull request, I'm not sure about this feature and the changes he is suggesting, I really appreciate it, but I promise I will take a look deeper into taking the best decision.
I'm always open to new ideas, but I have to be sure that I'm taking the best decisions for all the Webinoly users.
by Talented
You have to call it as you see it. It's your project and your decision. In the end the only thing not taking his NginX config suggestion would mean was that the plugin's "Remove query string from processed resources" doesn't work, and that can be done in many other ways. I trust your decision.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.