• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Random 404 request urls was not found on this server

megatapok

New Pleskian
Hello! Can somebody help me? I append some sites in plesk, all is ok, but sometimes i get error: request urls was not found on this server. It happens at random time. And this error doesn't left in plesk logs
 
I have exactly the same issue on a new staging website.

And sorry @Molydoly It doesn't seem that your answer is fiting the question of @megatapok

So i have a live website with everything fine

I create a staging website on a sub-domain of the live website. (so they have the same web server setting)

But some times for no reasons i have a

Not Found​

The requested URL was not found on this server.


Apache Server at staging.website.com Port 443
 
@Teal_cfr The only occasion I have seen a similar symptom before is when URL rewrites for or on-the-fly generation of static resources are used and Nginx caching is on.

Example how this could happen (this way or similar, it is just an example to make clear why such things can happen): The website shall deliver a .jpg file to the browser. But that .jpg does not physically exist on the server. It is generated by a script. When the first request hits the server, Nginx looks into its cache if it has seen the same request before. It does not know it yet so it asks Apache for the file. Apache has a URL rewrite for the URL and runs a script that returns a data stream as if it was the file. It hands the data to Nginx, Nginx delivers that data to the browser, the browser displays the image. The second requests comes in for the same file. Now Nginx knows "Hey, I know that file, let's get this one straight from disk ...", but it won't find the file on disk, because the file has never been there, but would need another script request. Now it returns a 404, because Nginx thinks the file doesn't exist. Again, just a rough sketch how these things can happen. Maybe something like this or similar fit your situation?
 
@Teal_cfr The only occasion I have seen a similar symptom before is when URL rewrites for or on-the-fly generation of static resources are used and Nginx caching is on.

Example how this could happen (this way or similar, it is just an example to make clear why such things can happen): The website shall deliver a .jpg file to the browser. But that .jpg does not physically exist on the server. It is generated by a script. When the first request hits the server, Nginx looks into its cache if it has seen the same request before. It does not know it yet so it asks Apache for the file. Apache has a URL rewrite for the URL and runs a script that returns a data stream as if it was the file. It hands the data to Nginx, Nginx delivers that data to the browser, the browser displays the image. The second requests comes in for the same file. Now Nginx knows "Hey, I know that file, let's get this one straight from disk ...", but it won't find the file on disk, because the file has never been there, but would need another script request. Now it returns a 404, because Nginx thinks the file doesn't exist. Again, just a rough sketch how these things can happen. Maybe something like this or similar fit your situation?
But if Proxy mode is activated, the Nginx doesn't manage anymore this ?
 
It was just an example as said before. The flaw in the example is that on the first request, the static resource would have been sorted out by Nginx already. But again: I was just trying to give you an idea in what scheme this type of error occurs. It can very well be that you are using a caching plugin in your website, that does something similar and causes a similar issue.
 
Back
Top