On 15/03/06, Tito <[EMAIL PROTECTED]> wrote:
> I am trying to add more than one virtual host in my vhost.conf file. I
> added and 01 and an 02 entry in the vhost.d directory. Once I add those
> am I supposed to removed 00 entry which is the default from the
> httpd.conf file? I tried both ways but it was still not working. What
> is the proper way to bind the ip address for the different vhosts
> (<VirtualHost ????>)? I need to know this so that I can set it properly
> for each vhost file for 00, 01, and 02.
In my httpd.conf file, I have only:
Include /etc/apache2/vhosts.d/*.conf
and I DO still have (and want) my 00_default_vhost.conf file in
vhosts.d/. It is possible to put all your domains in a single
*vhost.conf file, but I split mine into a separate file for each. Not
sure of the Gentoo convention, but I prefer separate files.
Is this name-based virtual hosts? If so, you need
<VirtualHost *:80>
ServerName domainname.com
DocumentRoot "/var/www/domain.com/htdocs" #optional but
recommended convention
#rest of config
</VirtualHost>
If it's IP-based, replace * with the IP address. I THINK that the
ServerName attribute is only necessary for multiple domains on the
same IP (which can also be the case on a box with multiple IP
addresses, of course).
Cheers,
Mickey
--
[email protected] mailing list