PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Setting up custom 404 error document on apache2 linux web server

Go down

Setting up custom 404 error document on apache2 linux web server Empty Setting up custom 404 error document on apache2 linux web server

Post by jamied_uk 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
jamied_uk
jamied_uk
Admin

Posts : 2952
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

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

Post by jamied_uk 25th April 2016, 23:52

Custom Error Docs Example




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

Posts : 2952
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

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