How to set-up custom error page on virtual host

Problems with the Linux version of XAMPP, questions, comments, and anything related.

How to set-up custom error page on virtual host

Postby LeeU » 27. September 2017 23:27

I am using Ubuntu 14.04 GNOME, with XAMPP and have set-up virtual hosts, using this type of layout (not the same I used but like it). The virtual hosts work fine in regular usage. I want to add a custom error page to the virtual host and did so, as shown below:

Code: Select all
<VirtualHost *:80>
  ServerAdmin mail@emetNewsNew.dev
  DocumentRoot "/home/lee/htdocs/emetNewsNew/"
  ServerName emetNewsNew.dev
  ServerAlias emetNewsNew.dev
  ErrorLog "logs/emetNewsNew-error_log"
  CustomLog "logs/emetNewsNew-access_log" common
  ErrorDocument 400 /errorpage.php
  ErrorDocument 401 /errorpage.php
  ErrorDocument 403 /errorpage.php
  ErrorDocument 404 /errorpage.php
  ErrorDocument 500 /errorpage.php
  <Directory "/home/lee/htdocs/emetNewsNew/">
      Require all granted   
  </Directory>
</VirtualHost>


However, it's not working. I get the generic XAMPP error page.
Code: Select all
errorpage.php
is in the root directory Any ideas of what's wrong?
Lee
LeeU
 
Posts: 6
Joined: 04. October 2006 16:03

Re: How to set-up custom error page on virtual host

Postby Nobbie » 28. September 2017 09:12

Browser cache?
Nobbie
 
Posts: 9817
Joined: 09. March 2008 13:04

Re: How to set-up custom error page on virtual host

Postby LeeU » 28. September 2017 19:27

No, I have already done that, several times.
Lee
LeeU
 
Posts: 6
Joined: 04. October 2006 16:03

Re: How to set-up custom error page on virtual host

Postby Nobbie » 28. September 2017 20:01

Please provide a detailed error description and show us access_log and error_log for that VirtualHost and also for default host.
Nobbie
 
Posts: 9817
Joined: 09. March 2008 13:04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests