VirtualHost not being recognized

Discussion in 'Apache' started by mmcds, May 12, 2010.

  1. #1
    We are running on RHEL 5.4 64bit OS and running httpd-2.2.14. We are trying to set up multiple virtual hosts with different DocumentRoot for each host. We are finding that our Apache web server is not recognizing the VirtualHosts and the directives inside of the VirtualHost, especially the DocumentRoot directive. We are finding that for the DocumentRoot, it's using the global DocumentRoot setting that is outside of the VirtualHost stanzas. We are finding that the configtest command is showing Syntax is OK and starting and stopping the web server is working fine, no errors in the logs either. Any help would be appreciated for making my VirtualHosts work.

    Below are the necessary items in our httpd.conf file pertaining to the Virtual Hosts. The rest of our httpd.conf file are just the default settings.

    Listen 172.26.2.221:8081
    Listen 172.26.2.221:8082

    NameVirtualHost 198.x.x.x:8082
    NameVirtualHost 198.x.x.x:8081

    <VirtualHost gpsdemo.autotest:8082>
    DocumentRoot /opt/eclipse/workspace/gps
    ServerName gpsdemo.autotest
    </VirtualHost>

    <VirtualHost stores.autotest:8081>
    ServerName stores.autotest
    DocumentRoot /opt/eclipse/workspace/test1
    </VirtualHost>
     
    mmcds, May 12, 2010 IP
  2. RAmoss

    RAmoss Guest

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What are the permissions? Are you getting a 404 error?
     
    RAmoss, May 17, 2010 IP