I can't seem to get the error_page directive working in nginx.
I have the following directive in the Apache settings which works fine when I go to a non-existent page/folder on the website:
ErrorDocument 404 /notfound.php
But if I try to go to a non-existent page with a .php extension then it just shows a "File not found" message.
I have put the following in the "additional nginx directives" but it has no effect:
error_page 404 /notfound.php;
location = /notfound.php {
root /var/www/vhosts/mydomain.com/httpdocs;
internal;
}
What am I doing wrong?
Running Plesk Onyx 17.5.3 Update #11 on Ubuntu 16.04.2 LTS
I have the following directive in the Apache settings which works fine when I go to a non-existent page/folder on the website:
ErrorDocument 404 /notfound.php
But if I try to go to a non-existent page with a .php extension then it just shows a "File not found" message.
I have put the following in the "additional nginx directives" but it has no effect:
error_page 404 /notfound.php;
location = /notfound.php {
root /var/www/vhosts/mydomain.com/httpdocs;
internal;
}
What am I doing wrong?
Running Plesk Onyx 17.5.3 Update #11 on Ubuntu 16.04.2 LTS