We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,163 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Apache2 Virtual Hosts on Ubuntu LAMP

I am attempting to setup virtual hosts so that I can host multiple sites on Apache2.

I have currently got two files in my /etc/apache2/sites-available folder, each containing the following:

<VirtualHost *:80>

    ServerName www.domain.com
    ServerAlias domain.com

    DirectoryIndex index.php
    DocmentRoot /var/www/domain

</VirtualHost>

Obviously the 'domain' changes to the domain for the two websites I am trying to host.

The problem is that when I go to domain.com and then domain2.com it only loads up domain.com in both examples...

Please could someone suggest what is going on?
I am using Ubunt 12.04

Thanks

2
Contributors
1
Reply
2 Days
Discussion Span
11 Months Ago
Last Updated
2
Views
Question
Answered
AHarrisGsy
Posting Pro in Training
484 posts since Nov 2011
Reputation Points: 52
Solved Threads: 40
Skill Endorsements: 13

Check /etc/hosts or DNS

billconner
Newbie Poster
1 post since Jan 2008
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
Question Answered as of 11 Months Ago by billconner

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0841 seconds using 2.77MB