I'm running Ubuntu 11.10, I have two IP addresses assigned to my VPS (Linode).

I have followed their guide to enable static addresses (can be found here: http://www.linode.com/wiki/index.php/Configure_Static_IPs)

The current situation is that I have 3 websites on that Linode and I want to set them up so site1 and site2 will use IP1 and site3 will use IP3

/etc/apache2/sites-available/site1.com

<VirtualHost 1.1.1.1:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin info@site1.com
  ServerName  site1.com
  ServerAlias www.site1.com


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /home/site1/public_html


  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/site1/public_html/log/error.log
  CustomLog /home/site1/public_html/log/access.log combined

</VirtualHost>

/etc/apache2/sites-available/site2.com

<VirtualHost 1.1.1.1:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin info@site2.com
  ServerName  site2.com
  ServerAlias www.site2.com


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /home/site2/public_html


  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/site2/public_html/log/error.log
  CustomLog /home/site2/public_html/log/access.log combined

</VirtualHost>

/etc/apache2/sites-available/site3.com

<VirtualHost 2.2.2.2:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin info@site3.com
  ServerName  site3.com
  ServerAlias www.site3.com


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /home/site3/public_html


  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/site3/public_html/log/error.log
  CustomLog /home/site3/public_html/log/access.log combined

</VirtualHost>

Relevant excerpt from ports.conf:

NameVirtualHost 1.1.1.1:80
NameVirtualHost 2.2.2.2:80
Listen 1.1.1.1:80
Listen 2.2.2.2:80

Problem is, I'm getting the content of site1 on all three sites. I have no idea why this is happening. Can you please assist?

Note: I have ran a2ensite for all 3 websites, no errors/warnings appear when i start the apache2 service.

link|improve this question
1  
possible duplicate of Multiple vhosts on multiple IP addresses – Shane Madden Jan 3 at 7:21
You have definitely done a full restart and not just a graceful? And have you tried just one "Listen 80" directive? – Ben Williams Feb 1 at 2:58
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.