-   Linux - Networking (
-   -   Apache2 Virtual Dynamic Hosts and defaults (

techrolla 10-31-2004 01:43 PM

Apache2 Virtual Dynamic Hosts and defaults
Okay guys, here's the scoop: I am running apache 2.0.51 and am using dynamic virtual hosts for the many (and many in the future) sites I host. Everything works fine getting the sites to show. For example, works fine because I have a /home/hosted/new/public_html folder, but lets say I have a subdomain, but I don't have a folder for it, lets say I want to have a main server error page when the dynamic error pages arn't found. Every virtual host is supposed to have an error folder with 404 and 403 error files in it, but if these files don't exist, I want a server generated 404 error file instead of the apache one saying it couldn't find an error message. Any ideas? Thanks.

Here is my dynamic vhost file:

LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
# include the server name in the filenames used to satisfy requests
VirtualDocumentRoot /home/hosted/%1/public_html
#VirtualScriptAlias  /home/hosted/%1/cgi-bin

ErrorDocument 404 /error/404.php
ErrorDocument 403 /error/403.php

#  This configuration can be changed into an IP-based virtual hosting
#  solution by just turning UseCanonicalName Off into UseCanonicalName DNS.
#  The server name that is inserted into the filename is then derived from
#  the IP address of the virtual host.

techrolla 11-01-2004 04:01 PM

To rephrase the question: how can I make one main server error 404 (etc.) error files if the user does not have their error files in the right folder, or with different names or they just don't exist; using dynamic virtual hosts. Thanks.

All times are GMT -5. The time now is 06:18 PM.