Virtual domains, only serving default page from default domain

Discussion in 'Apache' started by jaymax, Jul 13, 2008.

  1. #1
    -------------------------------------------------------------------------
    Hello,

    I'm running Apache 2.x on a FreeBSD box O/S 6.x BIND named 9.31, I have multiple domains => 1 IP # in a virtual host configuration. The domain names resolve OK!

    ping, dig, host and nslookup points to the correct IP #,

    Pointing the browser to any of the hosts but the display is stuck on the default host.
    Does one have to disable the 'main configuration' to enable Virtual Host service? This was a suggestion but it seemed so far removed that I have not tried it yet.

    Set up in extra/httpd-vhosts.conf =>


    {many directives of the form below} =>

    Virtual hosts check with
    =>



    VirtualHost configuration check:
    {So the virtual config seems OK!}

    Then what could be the reason(s) for not delivering the appropriate pages?
     
    jaymax, Jul 13, 2008 IP
  2. revvi

    revvi Peon

    Messages:
    58
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hi please check the dns whether it is pointing to the right address.
    For example, if it is in local windows, we need to add an entry in hosts file for each virtual host.
     
    revvi, Jul 13, 2008 IP
  3. jaymax

    jaymax Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks
    Not too sure if I got the gist of your reply
    nslookup or host points to the correct IP numbers , I think



    192.168.50.75 is the IP # of the web server

    dig - all of the form


    192.168.78.2 is DNS of ISP provider
    although running my own nameservers querries are forwarded

    Sinilarly for nslookup



    Now if I place any of the virtual server directives
    at the head (default position) of the extra/httpd-vhosts.conf file the correct page will be served.
     
    jaymax, Jul 14, 2008 IP
  4. jaymax

    jaymax Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks
    Not too sure if I got the gist of your reply
    nslookup or host points to the correct IP numbers , I think



    192.168.50.75 is the IP # of the web server

    dig - all of the form


    192.168.78.2 is DNS of ISP provider
    although running my own nameservers querries are forwarded

    Sinilarly for nslookup



    Now if I place any of the virtual server directives
    at the head (default position) of the extra/httpd-vhosts.conf file the correct page will be served.
     
    jaymax, Jul 14, 2008 IP
  5. jaymax

    jaymax Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Problem solved, "www." was required in the server address, thought the alias settings would have taken care of that, or it probablywasn't set up properly.
     
    jaymax, Jul 14, 2008 IP