Posts: 9
Joined: Sun May 12, 2019 6:27 pm

Apache default 404 page

Mon Jan 06, 2020 2:55 pm

Hi everyone!

I have an Apache server running on my pi.

I would like to know where the default 404 page is so i can replace it with a new one.

Thanks in advance!

User avatar
Posts: 16969
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Apache default 404 page

Mon Jan 06, 2020 3:28 pm

Just add a custom error page handler in your site config file (and create the file of course).

Code: Select all

ErrorDocument 404 /404.html
in your /etc/apache2/sites-enabled/000-default file (or other custom site file if you have one), then create the error page as /var/html/www/404.html. Reload Apache and it should work.
Unreadable squiggle

Return to “Advanced users”