Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all Quick question - here is my virtual hosts entry list: <VirtualHost www.domain1.com> DocumentRoot /var/www/html/domain1folder/ ServerName www.domain1.com ServerAdmin webmaster@domain1.com ServerAlias domain1.com DirectoryIndex index.php index.html index.htm index.shtml </VirtualHost> <VirtualHost www.domain2.net> ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Location
    Nottingham, UK
    Posts
    2

    Apache virual servers


    Hi all

    Quick question - here is my virtual hosts entry list:

    <VirtualHost www.domain1.com>
    DocumentRoot /var/www/html/domain1folder/
    ServerName www.domain1.com
    ServerAdmin webmaster@domain1.com
    ServerAlias domain1.com
    DirectoryIndex index.php index.html index.htm index.shtml
    </VirtualHost>

    <VirtualHost www.domain2.net>
    DocumentRoot /home/domain2/domain2folder/
    ServerName www.domain2.net
    ServerAdmin webmaster@domain2.com
    ServerAlias domain2.net
    DirectoryIndex index.php index.html index.htm index.shtml
    </VirtualHost>

    <VirtualHost www.domain3.com>
    DocumentRoot /var/www/html/domain3folder/
    ServerName www.domain3.com
    ServerAdmin webmaster@domain3.com
    ServerAlias domain3.com
    DirectoryIndex index.php index.html index.htm index.shtml
    </VirtualHost>
    People - as far as I can see this is ok - but it is only responding to ONE of the domains - the first in the list.

    I have 2 nw cards with different ip's - do I need to bind each site to a specific ip address?

    Apache is not my thing really , but I have done the RTFM thing as much as I *can* but I think I have missed summat.

    Any help appreciated

  2. #2
    Just Joined!
    Join Date
    May 2005
    Posts
    17
    if they are all being hosted on the same machine dont the machine names all need to be identical also which file did you write them in is it the virtualhosts file etc

  3. #3
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    do you have the namedbased host line? you might be missing a line above that

    http://httpd.apache.org/docs/vhosts/name-based.html

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •