help with Virtual Hosts on Apache
- From: Wade Smart <wade@xxxxxxxxxxxxx>
- Date: Mon, 26 Mar 2007 18:52:21 -0500
03262007 183 GMT-6 DST
Im working on setting up joomla on my system. To get this installed
though I had to setup virtual hosts. This way I can test various sites
out.
On this tutorial
http://www.debuntu.org/2006/02/22/7-virtual-hosting-using-apache-2
I followed the instructions to setting up a virtual host.
Ill repost a very condensed version here:
1) cd /etc/apache2/sites-available
2) sudo gedit name.com.conf
Paste:
<VirtualHost dev.example.com>
ServerAdmin webmaster@localhost
ServerAlias www.dev.example.com
DocumentRoot /home/myuser/public_html/example.com
ScriptAlias /awstats/ /usr/lib/cgi-bin/
CustomLog /var/log/apache2/example.com-access.log combined
</VirtualHost>
3) cd /etc/apache2/sites-enabled/
4) sudo ln -s /etc/apache2/sites-available/name.com.conf name.com.conf
5) sudo gedit /etc/hosts
add:
127.0.0.1 localhost.localdomain localhost dev.name.com www.dev.name.com
6) sudo /etc/init.d/apache2 reload
So I did this with these specifics:
<VirtualHost dale.com>
ServerAdmin webmaster@localhost
ServerAlias www.dale.com
DocumentRoot /var/www/public_html/example.com
ScriptAlias /awstats/ /usr/lib/cgi-bin/
CustomLog /var/log/apache2/example.com-access.log combined
</VirtualHost>
and under /etc/hosts I added
127.0.0.1 sam.com dale.com
Problem is, what happens when I add a second and a third entry?
I created a second entry and received this error after restarting
apache:
[Mon Mar 26 18:34:24 2007] [warn] VirtualHost dale.com:0 overlaps with
VirtualHost sam.com:0, the first has precedence, perhaps you need a
NameVirtualHost directive
Am I doing this wrong?
wade
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Follow-Ups:
- Re: help with Virtual Hosts on Apache
- From: Derek Broughton
- Re: help with Virtual Hosts on Apache
- From: Sven Richter
- Re: help with Virtual Hosts on Apache
- Prev by Date: smbclient syntax
- Next by Date: Re: smbclient syntax
- Previous by thread: smbclient syntax
- Next by thread: Re: help with Virtual Hosts on Apache
- Index(es):
Relevant Pages
|