1 |
On 15/03/06, Tito <tito@×××××××.com> wrote: |
2 |
> I am trying to add more than one virtual host in my vhost.conf file. I |
3 |
> added and 01 and an 02 entry in the vhost.d directory. Once I add those |
4 |
> am I supposed to removed 00 entry which is the default from the |
5 |
> httpd.conf file? I tried both ways but it was still not working. What |
6 |
> is the proper way to bind the ip address for the different vhosts |
7 |
> (<VirtualHost ????>)? I need to know this so that I can set it properly |
8 |
> for each vhost file for 00, 01, and 02. |
9 |
|
10 |
In my httpd.conf file, I have only: |
11 |
|
12 |
Include /etc/apache2/vhosts.d/*.conf |
13 |
|
14 |
and I DO still have (and want) my 00_default_vhost.conf file in |
15 |
vhosts.d/. It is possible to put all your domains in a single |
16 |
*vhost.conf file, but I split mine into a separate file for each. Not |
17 |
sure of the Gentoo convention, but I prefer separate files. |
18 |
|
19 |
Is this name-based virtual hosts? If so, you need |
20 |
<VirtualHost *:80> |
21 |
ServerName domainname.com |
22 |
DocumentRoot "/var/www/domain.com/htdocs" #optional but |
23 |
recommended convention |
24 |
#rest of config |
25 |
</VirtualHost> |
26 |
|
27 |
If it's IP-based, replace * with the IP address. I THINK that the |
28 |
ServerName attribute is only necessary for multiple domains on the |
29 |
same IP (which can also be the case on a box with multiple IP |
30 |
addresses, of course). |
31 |
|
32 |
Cheers, |
33 |
Mickey |
34 |
|
35 |
-- |
36 |
gentoo-user@g.o mailing list |