Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual Hosts VS My Hair!!!!!

Status
Not open for further replies.

tribalcog

Technical User
May 3, 2002
4
NZ
Please please help!! I have been through the forum, manual, etc. . . and while many seem to have similar problems none seem to solve my problem.

Background:

I am running Apache 1.3.x on RedHat 7.1. I need to run 2 domains on the one IP. The first domain that I have been running for some time is tribalcog.com. I have recently bought berenpatterson.com and want to run this as well. I want it to be name based simply to keep everything on 1 IP.

Problem:

When I try to set up the Virtal Hosts I get a 403 - I also get the following error when restating the services using Webmin (note I am configuring the httpd.conf manually) :

Failed to start apache :
Starting httpd: [60G[ [1;32mOK[0;39m ]


Summery of httpd.conf:

ServerRoot /etc/httpd/

ServerName tribalcog.com

ServerAdmin beren@tribalcog.com

Listen 80

Port 80

# Defaults for virtual hosts
ServerSignature on

HostNameLookups Off

# Virtual hosts

NameVirtualHost tribalcog.com


<VirtualHost berenpatterson.com>
ServerName DocumentRoot /home/beren/folio
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
</VirtualHost>

What I have done:

I have changed the domains to IP and visa versa in virtually every permutation. While berenpatterson.com is a newly registered domain I can ping berenpatterson.com from the server so I presume that the DNS that the server is using is resolving berenpatterson.com back to 203.109.149.220.

I have now changed the httpd.conf back temporarily so I can keep the existing server live.

Any help GRATEFULLY received!

Beren
 
Hi mate,

Try the following..

#Listen 80

Port 80

BindAddress *

# Defaults for virtual hosts
ServerSignature on

HostNameLookups Off

# Virtual hosts

NameVirtualHost *


<VirtualHost *:80>
UseCanonicalName off
ServerName ServerAlias *.berenpatterson.com
ScriptAlias /cgi-bin/ &quot;/beren/folio/cgi-bin/&quot;
DocumentRoot /home/beren/folio
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
</VirtualHost>
<VirtualHost *:80>
UseCanonicalName off
ServerName ServerAlias *.domain2.com
ScriptAlias /cgi-bin/ &quot;/DocumentRoot /home/domain2
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
</VirtualHost>

Hope this helps Wullie

 
Superb! Nailed! Your help much appreciated - I owe you a beer or a bottle or Regain (I have one spare now).

Part of my problem was I had http instead of html as a directory in my doc path - some people are beyond help!

THANKS!!!!!!!

Beren [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top