Difference between revisions of "Apache 2 - Custom error page"

(Created page with "Edit your virtual host configuration: vim /etc/apache2/site-enabled/smartcards.conf Add: ## ERROR directory Alias /errors /var/www/errors <Locatio...")
(No difference)

Revision as of 22:09, 31 July 2014

Edit your virtual host configuration: vim /etc/apache2/site-enabled/smartcards.conf

Add:

       ## ERROR directory
       Alias   /errors   /var/www/errors
       <Location /errors >
               #Require all granted
               ProxyPass !
               order deny,allow
               allow from all
       </Location>
       ErrorDocument 403 /errors/error403.html

Create the error page mkdir -p /var/www/errors cp <monImage> /var/www/errors/error403.png vim /var/www/errors/error403.html