Apache 2 - Custom error page

Revision as of 22:09, 31 July 2014 by WikiFreak (talk | contribs) (Created page with "Edit your virtual host configuration: vim /etc/apache2/site-enabled/smartcards.conf Add: ## ERROR directory Alias /errors /var/www/errors <Locatio...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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