mass virtual hosting with virtual alis

Discussion in 'Apache' started by Omery, Apr 5, 2011.

  1. #1
    Hi all

    I read about mass virtual hosting with mod rewrite and it seems grate for me.
    I want to implament it but i have a problem. I dont kno how to do it with server alias:

    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerName www.domain.tld
    ServerAlias domain.tld *.domain.tld
    DocumentRoot /www/domain
    </VirtualHost>
    <VirtualHost *:80>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain
    </VirtualHost>

    how can I do it

    Thanks
     
    Omery, Apr 5, 2011 IP
  2. CI-Andrew

    CI-Andrew Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #2
    I'm not sure what is the problem exactly? The ServerAlias is an optional list of additional domains (in addition to ServerName) that the virtual host will respond to. You have it configured properly above so it should work.
     
    CI-Andrew, Apr 5, 2011 IP
  3. Arthur Juno

    Arthur Juno Member

    Messages:
    108
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    48
    #3
    Anyone out there that knows how to fix this?!
     
    Arthur Juno, Apr 7, 2011 IP