V-Host using port

Discussion in 'Apache' started by rgoth, Apr 27, 2007.

  1. #1
    Hi I have set up some virtual host using different hosts as I only have one IP address they look something like this

    Listen *:8080
    Listen *:80
    Listen *:7000

    <VirtualHost *:8080>
    DocumentRoot C:/www/
    ServerName www.domain_one.com
    </VirtualHost>

    <VirtualHost *:7000>
    DocumentRoot C:/www/sub_domain/
    ServerName www.domain_two.com
    </VirtualHost>

    They are working fine except when I go to the page the IP address comes up instead of the server name . ie

    In the address bar I get:

    xxx.xxx.xxx:8080 instead of "www.domain_one.com"

    and

    xxx.xxx.xxx:7000 instead of "www.domain_two.com"

    Can I do anything about this????
     
    rgoth, Apr 27, 2007 IP
  2. Faltzer

    Faltzer Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm guessing you are using Windows with Apache? I don't recommend the usage of Windows with Apache, if not IIS because it suits the environment more.

    But, if I recall correctly, you need to declare the domain via name based virtual hosting, or declare the IP. instead of using *(it conflicts)
     
    Faltzer, Apr 28, 2007 IP