dcwateruser wrote: .htaccess file content;
- Code: Select all
ErrorDocument 404 /error.html
Remove the leading slash or Apache will look in the \xampp\apache\error folder for error.html which it obviously can't find if it is not in there or give it a full path to the file.
dcwateruser wrote:httpd.conf file content;
- Code: Select all
<VirtualHost *:80>
ServerName fleet.xxxx.com
ServerAlias fleet.yyyy.com
ServerAdmin myadmin@mydomain.com
DocumentRoot "C:/xampp/virtualsites/fleet_prod/"
ErrorLog "logs/fleetprod-error.log"
CustomLog "logs/fleetprod-access.log" combined
ErrorDocument 404 /error.html
</VirtualHost>
Remove the trailing slash after the fleet_prod and add a Directory Directive to the container to eliminate errors in the log file and to give correct permissions for the VirtualHost DocumentRoot.
Change the path to the error.html file to suit.
- Code: Select all
<VirtualHost *:80>
ServerName fleet.xxxx.com
ServerAlias fleet.yyyy.com
ServerAdmin myadmin@mydomain.com
DocumentRoot "C:/xampp/virtualsites/fleet_prod"
<Directory "C:/xampp/virtualsites/fleet_prod">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog "logs/fleetprod-error.log"
CustomLog "logs/fleetprod-access.log" combined
ErrorDocument 404 "C:/xampp/virtualsites/fleet_prod/error.html"
</VirtualHost>
dcwateruser wrote:httpd.conf
- Code: Select all
ErrorDocument 404 /error.html
Again remove the leading slash and specify the full path to the file.
BTW the Apache error files are handled and configured in the \xampp\apache\conf\extra\httpd-multilang-errordoc.conf file and the error files are stored in \xampp\apache\error folder, so it is possible to edit files in this folder using a text editor to give server wide coverage or add your own error.html file in here and change the setting in the conf file above to suit - which may then allow your
/error.html code above to work without change.
Also if you comment out this section and then create your own error files in locations you individually specify in the conf files then the server will not give the default server error messages
- Code: Select all
# Multi-language error messages
Include "conf/extra/httpd-multilang-errordoc.conf"
Best wishes and good luck.