Setting up custom 404 error document on apache2 linux web server

Go down

Setting up custom 404 error document on apache2 linux web server

Post by jamied_uk on 17th July 2015, 14:39


1. type this in your console (aka terminal)

Code:
locate localized-error-pages


now type this command

sudo gedit (add the result of the file name path found by locate command)


example of what i got as a result was this line

/etc/apache2/conf-available/localized-error-pages.conf

So now type this (example)

Code:
sudo gedit /etc/apache2/conf-available/localized-error-pages.conf

now this will allow you to add this line (example)

Code:
ErrorDocument 404 /notfound.php


Now restart and test it out! (supply your own notfound.php file that you wish!

Code:
sudo /etc/init.d/apache2 reload
avatar
jamied_uk
Admin

Posts : 2320
Join date : 2010-05-09
Age : 35
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Setting up custom 404 error document on apache2 linux web server

Post by jamied_uk on 25th April 2016, 23:52

Custom Error Docs Example




Online Update Box Link
https://app.box.com/s/ohc50fop9sksqd6jh2do324e8kezpklw
avatar
jamied_uk
Admin

Posts : 2320
Join date : 2010-05-09
Age : 35
Location : UK

http://address-shortner.co.uk

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum