• 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

Question Custom 404 error page if you useing nginx

Dumitru

New Pleskian
how to create custom 404 page if we use - FPM application served by nginx
instead of File not found. message on page

404.jpg

I created custom 404.html page

I tried this:
----------------------------
In Additional directives for HTTP - add ErrorDocument 404 /404.html
not working
------------------------------
add in nginx.conf add this

server {
listen 80;
error_page 404 /404.html;
location /404.html {internal;}
}
not working
-----------------------------

any other idea ?
 
Yes Custom error documents checkbox is set
I try to open some missed files ex mydomen.com/extra.php
And in browser is showing: File not found.

in error_docs it isn't some file with this messages for example in not_found.html it is this text "The requested document was not found on this server."
if I change this docs the message is still the same File not found.

log files is showing nginx error - with message FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

nginx.png
 
Back
Top