Change 404 Page on Apache – Linux

Use the ErrorDocument directive in your conf file to set a custom error message.

The easiest way to do this:

  1. Create a file with your custom error message. Save it in:
    vim /var/www/not_found.html
  2.  Edit  vim /etc/apache2/httpd.conf :

    Find the line that says:
    #ErrorDocument 404 /not_found.html

    Remove the leading “#”.
    ErrorDocument 404 /not_found.html

    Save.

  3.  Restart apache.
    /etc/init.d/apache2 restart

Done!

 

Advertisements

3 thoughts on “Change 404 Page on Apache – Linux

  1. Lamont says:

    I just like the helpful information you supply on your articles.
    I will bookmark your blog and check once more right here frequently.
    I’m quite certain I’ll learn plenty of new stuff right here!
    Good luck for the following!

  2. Destiny game Guide says:

    I’m extremely pleased to discover this page.

    I want to to thank you for your time due to this wonderful read!!
    I definitely enjoyed every little bit of it and i also
    have you bookmarked to see new information on your blog.

  3. Donald says:

    They have never ever been authorized through the
    fellowship members at large. Grab the cart’s handle and
    start pushing it down the main strip. the blissful effects with the kundalini simply loose
    yourself inside it, regardless of.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s