Hello,
I have successfully setup MYSQL, Apache2, and PHP on my laptop.
I have successfully setup www.site3.com on my computer.
However, I cannot setup site2 or site1. They all point to the same site.
Pinging all three sites gives the same response: 127.0.0.1
Here is the error message I get when I reload Apache:
Here is a snippet from the /etc/hosts file:
Here is config file for a single site:
Has anyone run into this problem before?
Is NameVirtualHost directive the way to go? What changes do I need to make to implement it?
Many thanks in advance for your help.
I have successfully setup MYSQL, Apache2, and PHP on my laptop.
I have successfully setup www.site3.com on my computer.
However, I cannot setup site2 or site1. They all point to the same site.
Pinging all three sites gives the same response: 127.0.0.1
Here is the error message I get when I reload Apache:
Code:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [Tue Aug 17 17:51:50 2010] [warn] VirtualHost site1.com:0 overlaps with VirtualHost site2.com:0, the first has precedence, perhaps you need a NameVirtualHost directive [Tue Aug 17 17:51:50 2010] [warn] VirtualHost site3.com:0 overlaps with VirtualHost site1.com:0, the first has precedence, perhaps you need a NameVirtualHost directive
Code:
127.0.0.1 localhost site3.com site2.com site1.com 127.0.1.1 ryy
Code:
<VirtualHost site1.com> ServerAdmin webmaster@localhost #We want to be able to access the web site using [url]www.dev.example.com[/url] or dev.example.com ServerAlias site1.com DocumentRoot /home/ryy/Sites/public_html/site1.com #if using awstats ScriptAlias /awstats/ /usr/lib/cgi-bin/ #we want specific log file for this server CustomLog /var/log/apache2/example.com-access.log combined </VirtualHost>
Is NameVirtualHost directive the way to go? What changes do I need to make to implement it?
Many thanks in advance for your help.
Comment