Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Posts
    70

    Apache 4.0.40 VirtualHosts are working every way but RIGHT!

    I am having a very strange issue at hand. I have a new webserver with Apache 2.0.40, RedHat 9 installed and am getting things setup for 2 virtualdomain hosts I'm setting up. I have entered the /etc/httpd/conf/httpd.conf file to edit to make Apache work. I have edited the following options with the following values:

    Listen *:80
    ...
    NameVirtualHost *:80
    ...

    <VirtualHost *>
    DocumentRoot /home/modemnet.biz/modemnet.biz
    ServerName www.modemnet.biz
    </VirtualHost>

    <VirtualHost *>
    DocumentRoot /home/miawmainecoons/www.miawmainecoons.com
    ServerName www.miawmainecoons.com
    </VirtualHost>

    Here is were the strange things come into play. If I goto www.modemnet.biz that actually works and it takes me to the html file located in mdoemnet.biz's home account. BUT if I try to goto www.miawmainecoons.com it takes me to the modemnet.biz html file! I've tried for hours and hours but I seemingly can't get various domains to point to the appropriate virtualserver. I know I haven't setup something properly so any advice is appreciated.

    Btw yes I have setup DNS properly so everything is working there.

    Help!

  2. #2
    Join Date
    Jan 2003
    Posts
    79
    Try

    Listen 80

    <VirtualHost *:80>
    ServerName www.modemnet.biz
    DocumentRoot /home/modemnet.biz/modemnet.biz
    </VirtualHost>

    <VirtualHost *:80>
    ServerName www.miawmainecoons.com
    DocumentRoot /home/miawmainecoons/www.miawmainecoons.com
    </VirtualHost>

    Apache 2 is up to 2.0.48. You may want to upgrade.

  3. #3
    Join Date
    Aug 2002
    Posts
    70
    Thanks for the help, but I ended up finding out the reason as to why it wasn't working. Actually I found the error shortly after posting. We use a specialized NAT setup in the data center so all internal machines have a 192.168.x.x and a routable 192.216.x.x IP. I found out I have to make the correction to the httpd.conf to show the following for BOTH ip addresses. It worked immediately.

    NameVirtualHost 192.168.1.1
    NameVirtualHost aaa.bbb.ccc.ddd

    <VirtualHost 192.168.1.1 aaa.bbb.ccc.ddd>
    DocumentRoot /home/modemnet.biz/modemnet.biz
    ServerName www.modemnet.biz
    </VirtualHost>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •