PDA

View Full Version : Apache virtual hosting webmin


AdamJBaldwin
2003-10-02, 20:47 PM
I am having a lot of trouble with Apache recognizing a name-based virtual domain as just that. I have a default domain, and I registered it with serverbeach's DNS servers. My resolv.conf says that geekjam.com is my main server, and that it is communicating with serverbeach DNS.

I am using geekjam.com right now ONLY as a forwarder to my IP. So whenever I create a virtual domain, for example reblood.com, I get a "forbiddden cannot access / on this server" and it says reblood at the host on the bottom of the screen.

I am lost, because I read the Apache virtual hosting chapter in my book and followed everything it said.

So basically I have 2 domains pointing to my IP which is serving from /var/www, and when I create a virtual server in webmin, I get a "forbidden cannot access /" error.

So I am wondering if anyone knows how to set up a main domain that points to /var/www, and other virtual hosts that point to the paths I choose. Everything is propogated, and I cannot seem to get webmin to see these as name-based domains, but simply DNS redirections.

Help?

Thanks
Here is a picture of what I am entering in webmin:

http://www.adambaldwin.net/Webmin.gif

AdamJBaldwin
2003-10-02, 22:31 PM
This is my resolv.conf
I am getting very confused as to how I am supposted to set up this virtual named based hosting. Books and websites seem to contradict each other. If anyone has any advice or a how-to set up a simple default domain & virtual name based hosting domains, i would be very grateful

Thanks


#/etc/resolv.conf
domain geekjam.com
nameserver 66.139.72.6
nameserver 66.139.72.22

knightfoo
2003-10-04, 00:00 AM
Originally posted by AdamJBaldwin
This is my resolv.conf
I am getting very confused as to how I am supposted to set up this virtual named based hosting. Books and websites seem to contradict each other. If anyone has any advice or a how-to set up a simple default domain & virtual name based hosting domains, i would be very grateful

Thanks


#/etc/resolv.conf
domain geekjam.com
nameserver 66.139.72.6
nameserver 66.139.72.22

The resolv.conf is just the local resolver configuration for your server and has no bearing on setting up your name-based hosting. The big picture view is pretty much three steps:

1. Make sure the domain/subdomain resolves properly through DNS
2. Add a NameVirtualHost statement to your httpd.conf for the IP address you are using
3. Add a VirtualHost section for each domain

-knightfoo