is this correct?

Discussion in 'Apache' started by AutoSnipe, Jun 15, 2008.

  1. #1
    hey just wanna know if this is the correct bit to have multiple sites on one server under newest version of Apache...

    
     <VirtualHost *:80>
    ServerName www.domain.tv
    ServerAlias domain.tv *.domain.tv
    DocumentRoot /var/www/html/domain
    </VirtualHost>
    
     <VirtualHost *:80>
    ServerName www.domain2.cn
    ServerAlias domain2.cn *.domain2.cn
    DocumentRoot /var/www/html/domain2.cn
    </VirtualHost>
    
     <VirtualHost *:80>
    ServerName www.domain3.net
    ServerAlias domain3.cn *.domain3.net
    DocumentRoot /var/www/html/domain3.net
    </VirtualHost>
    
    
    Code (markup):
    plz get back to me soon, as i'm tryin 2 finish it now.. :)
     
    AutoSnipe, Jun 15, 2008 IP
  2. hoodvs2

    hoodvs2 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What you've created there are the most simple of virtualhost containers, and yeah, they appear to be valid for most configs of apache. Can you give a little more information about what you're doing and where you're putting those?
    'apachectl configtest' might also give you a little helpful output, as well as the httpd logs.
     
    hoodvs2, Jun 17, 2008 IP
  3. tkovacs

    tkovacs Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    As 'hoodvs2' said, that should work at it's most basic - however, I'd really add configuration for error logs and access logs to each VirtualHost separately.
     
    tkovacs, Jun 17, 2008 IP
  4. centsi

    centsi Active Member

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #4
    Looks correct to me
     
    centsi, Jun 17, 2008 IP