1 |
On Sat, 2006-03-11 at 10:33 +0000, Tito Valentin wrote: |
2 |
> Hello All, |
3 |
> |
4 |
> I am trying to get apache to work with a few vhost. The problem is that |
5 |
> when I hit www.domain.com it shows the apache page rather than the |
6 |
> actual site. In order for me to be able to view the site I have to type |
7 |
> www.domain.dom/folder and then the site comes up. Here is what I have |
8 |
> done so far with the vhost.conf files: |
9 |
> |
10 |
> Apache2 on Gentoo |
11 |
> |
12 |
> /etc/apache2/httpd.conf |
13 |
> Include vhosts.d/00_default_vhost.conf |
14 |
> Include vhosts.d/01_my_domain_vhost.conf |
15 |
> |
16 |
> /etc/conf.d/apache2 |
17 |
> -D DEFAULT_VHOST (plus ssl and other) |
18 |
> |
19 |
> /etc/apache2/vhosts.d/00_default_vhost.conf |
20 |
> Default file with new domain information. |
21 |
> |
22 |
> /etc/apache2/vhosts.d/01_my_domain_vhost.conf |
23 |
> <VirtualHost www.my_domain.com> |
24 |
> ServerAdmin webmaster@my_domain.com |
25 |
> DocumentRoot /var/www/localhost/htdocs/parknorthcondos |
26 |
> DirectoryIndex index.php index.html |
27 |
> ServerName www.my_domain.com |
28 |
> ErrorLog /var/log/apache2/vhosts/my_domain_error_log |
29 |
> CustomLog /var/log/apache2/vhosts/my_domain_access_log common |
30 |
> </VirtualHost> |
31 |
HI |
32 |
|
33 |
you have to have "NameVirtualHost *:80" before the first virtual host. |
34 |
then the VirtualHost directive should be as follow: |
35 |
<VirtualHost *:80> |
36 |
ServerName www.mydomain.com |
37 |
... |
38 |
</VirtualHost> |
39 |
|
40 |
you have to do the same with ':443' if you want SSL virtual hosts. |
41 |
|
42 |
the above instructions are for VirtualHosts running on the same IP. if |
43 |
you want to run each virtual host on a separate IP you have to discard |
44 |
the 'NameVirtualHost' directive and replace the '*' with ipaddress in |
45 |
the 'VirtualHost' directive. |
46 |
|
47 |
Bye |
48 |
> |
49 |
> I just want to be able to hit www.my_domain.com and able to see my site |
50 |
> instead of the apache splash page. |
51 |
> |
52 |
> Any help is greatly appreciated. |
53 |
> |
54 |
> Thanks, |
55 |
> Tito |
56 |
-- |
57 |
Haim |