LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Apache2 Virtual Dynamic Hosts and defaults (https://www.linuxquestions.org/questions/linux-networking-3/apache2-virtual-dynamic-hosts-and-defaults-249533/)

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, http://new.muffinpeddler.com 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 http://max.muffinpeddler.com. 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:
Code:

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.