: I can't personalise my error pages -- Apache ErrorDocument directive results in additional not found error I use apache 2.4.10, and I can't use personal error pages. I changed /etc/apache2/conf-available/localized-error-pages.c
I use apache 2.4.10, and I can't use personal error pages.
I changed /etc/apache2/conf-available/localized-error-pages.conf and added :
ErrorDocument 404 /404.html
and created the file /var/www/404.html with the short string 404test inside.
However, when I relaunch apache, I get
Not Found
The requested URL / was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
What's wrong?
Is there a way to get more detail on the error?
More posts by @Shelley277
3 Comments
Sorted by latest first Latest Oldest Best
Do not use .htaccess it add extra useless disk access.
Edit your web site configuration in /etc/apache2/sites-enabled/{yoursite}.conf add this outside any tag
# Error documents
ErrorDocument 404 /404.htm
# allow errors pages to be visible from any virtual host
Alias /404.htm /var/www/errors/404.htm
Like that your error pages will be available for any of your virtual host, without adding extra code in virtual host and save harddrive useless access.
Using internet explorer?
your 404 page should have a minimum 0f 512 bytes of text. So say a line or 10.
just try it with longer text.
Roll back your changes in /etc/apache2/conf-available/localized-error-pages.conf, then use .htaccess to create a custom 404 page with the following:
ErrorDocument 404 /404.html
If that fails then try adding the full path to the 404.html document.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.