Find the answer to your Linux question:
Results 1 to 2 of 2
Dear Users, I host the following 2 website on my system named as: 1) www.mysite.com 2) www.mysite1.com When i open #1 site its open successfully but when i want to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2004
    Location
    karachi
    Posts
    45

    Webhost problem


    Dear Users,

    I host the following 2 website on my system named as:

    1) www.mysite.com
    2) www.mysite1.com

    When i open #1 site its open successfully but when i want to open #2 site
    its shows the webpage of # 1 site.

    My sites directory are as follows:

    /var/www/html/site1
    /var/www/html/site2

    I checked the directory path again & again but its Ok.Also DNS working successfully too, but i cant understand wat i forget in configuration.

    Also my webmail (squirrelmail) is not open they show directory Index

    what can i do to solved all the above mentioned problems

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Have you configured virtual hosts in your httpd.conf?

    Eg, for virtual hosts you might have the following at the bottom of your httpd.conf

    Code:
    NameVirtualHost *
    
    <VirtualHost *>
        DocumentRoot var/www/html/site1
        ServerName mysite.com
        ServerAlias www.mysite.com
    </VirtualHost>
    
    <VirtualHost *>
        DocumentRoot var/www/html/site2
        ServerName mysite1.com
        ServerAlias www.mysite1.com
    </VirtualHost>
    Remember to restart apache after making configuration changes.

    Jason

Posting Permissions

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