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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISP Help....Virtual Hosting/DNS entries 1

Status
Not open for further replies.

force5

ISP
Nov 4, 2004
118
US
A little background of my situation:
I work for a local ISP and we are adding a new webserver to run Apache 2.0. We are going to leave our currently hosted websites(about 100) on our ISS box, and all new sites will get set up on Apache. I have RedHat 9.0 and am using the Apache that is bundled with it. I have been "Thrown to the Wolves" and expected to get this up and running. I have read "Teach Youself Apache in 24 hours" and also 1/2 of the Apache Administrators Handbook and not to mention about 3 weeks of research online. WHEW!
I have Apache set up and understand the different modules, settings, etc....but for the life of me, I can not figure out how the IP based Virtual Hosting works. I have tried many different configurations but nothing is working. Every site, book, or other resource, does it a little different.
My manager is really pressing me to get this going... would anyone be willing to speak to me via phone instead of going back and forth through this forum? If not that's ok...I'm just in a bit of a "pinch".
Thanks
 
Firewall...but my manager, who is also the Network Admin here, says that it is coming through ok
 
Well, do you have the external website names as ServerAlias's ?

 
actually, after reading a little on apache.org, I used both ServerName and ServerAlias:

NameVirtualHost xx.xxx.xx.xx:80

<VirtualHost xx.xxx.xx.xx:80>
ServerAdmin webmaster@cust1.com
DocumentRoot /var/log/ ServerName ServerAlias cust1.com
ErrorLog /home/cust3/ CustomLog /home/cust3/ combined
</VirtualHost>

Plus, I added the following to be my first VirtualHost listed in httpd.conf(per apache.org documentation):

<VirtualHost xx.xxx.xx.xx:80>
ServerName xx.xxx.xx.xx:80
DocumentRoot /var/</VirtualHost>
 
ooops...and I forgot to add that after I did that, now 2 of them work and the other 2 come up with Apache's default "Test Page".
jeeezum!!!!!

:)
 
Try getting rid of all ServerName directives and tell me what happens.
 
I did that eric....then none of the sites worked...they all pointed to the " Apache Test Page". I put the ServerName back in and now 2 of them work again, the other 2 still see the Test Site.
I noticed this error in ONE of the sites that is still pointing to the Test Page:
[Thu Nov 18 07:38:58 2004] [error] [client 10.10.10.130] Directory index forbidden by rule: /var/
thanks
 
I've had to deal with this same problem several times and have yet to definitively determine what the problem or solution is. In my config I have exactly one ServerName directive in the global config section and all my virtual hosts have only ServerAliases. Having ServerName in my virtual host configs has always been problematic for me.
 
Let me post a little more of my httpd.conf:
ServerRoot "/etc/httpd"
Listen 10.10.10.21:80
ServerName 10.10.10.21:80
UseCanonicalName Off
DocumentRoot "/var/NameVirtualHost 10.10.10.21:80

<VirtualHost 10.10.10.21:80>
DocumentRoot /var/ ServerName 10.10.10.21:80
</VirtualHost>

<VirtualHost 10.10.10.21:80>
DocumentRoot /var/ ServerName ServerAlias cust1.com
ErrorLog /var/log/ CustomLog /var/log/ combined
</VirtualHost>

<VirtualHost 10.10.10.21:80>
DocumentRoot /var/ ServerName ServerAlias cust2.net
ErrorLog /var/log/ CustomLog /var/log/ combined
</VirtualHost>

<VirtualHost 10.10.10.21:80>
DocumentRoot /var/ ServerName ServerAlias cust3.net
ErrorLog /var/log/ CustomLog /var/log/ combined
</VirtualHost>

<VirtualHost 10.10.10.21:80>
DocumentRoot /var/ ServerName ServerAlias cust4.info
ErrorLog /var/log/ CustomLog /var/log/ combined
</VirtualHost>
 
A lot of your problem may also be due to you having a "NameVirtualHost" with an IP address instead of an actual name. They are not interchangable.
 
For me what works is to have a servername in each section and use the IP to set the vhost.

Then I have a serveralias for all the alias.

I host about 250+ domains in this manner, it works great.

I think the other two do not work because you have some sort of naming issue.

If you could at some point post the real URL's and config we can actually hit the site and see how it reacts as well as compare the reality of your config. Many times people take out the important information when transposing the URL's for privacy.
 
Ok...awesome!! My manager is going to shoot me if he finds out.....but hey....he is going to shoot me anyways if I don't get this Webserver up and running :) Is there anyway I can email you instead...to keep it off a public site?




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top