LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 10-31-2004, 02:43 PM   #1
techrolla
Member
 
Registered: Nov 2003
Distribution: Gentoo, Debian
Posts: 188

Rep: Reputation: 30
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.
 
Old 11-01-2004, 05:01 PM   #2
techrolla
Member
 
Registered: Nov 2003
Distribution: Gentoo, Debian
Posts: 188

Original Poster
Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subdomains on Apache2 with virtual hosts - how? <Ol>Origy Linux - Networking 2 08-18-2005 06:53 AM
Virtual Hosts with Dynamic IP and dyndns.org lexton Linux - Networking 1 08-11-2004 05:06 AM
Virtual Hosts, defaults on port 81 with Apache not working S3ct0r Linux - Networking 2 06-19-2004 04:35 PM
Apache2, SSL, 2 Virtual Hosts franticbob Linux - Software 0 04-07-2004 10:48 PM
apache2 virtual hosts viniosity Linux - Software 4 02-07-2004 01:15 AM


All times are GMT -5. The time now is 10:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration