1 |
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 |
A quick guess without looking in detail at your config... if parts of |
11 |
the virtual host are working, but the root isn't, then it makes me think |
12 |
it's a cache issue. Clear your browser's cache and try the page again. |
13 |
|
14 |
|
15 |
> /etc/apache2/vhosts.d/01_my_domain_vhost.conf |
16 |
> <VirtualHost www.my_domain.com> |
17 |
> ServerAdmin webmaster@my_domain.com |
18 |
> DocumentRoot /var/www/localhost/htdocs/parknorthcondos |
19 |
> DirectoryIndex index.php index.html |
20 |
> ServerName www.my_domain.com |
21 |
> ErrorLog /var/log/apache2/vhosts/my_domain_error_log |
22 |
> CustomLog /var/log/apache2/vhosts/my_domain_access_log common |
23 |
> </VirtualHost> |
24 |
|
25 |
You need to use <VirtualHost *:80>. The argument to a VirtualHost is the |
26 |
NameVirtualHost that it matches to (NameVirtualHost *:80 should be in |
27 |
the default config) |
28 |
|
29 |
I would also suggest, using /var/www/my_domain/htdocs instead of |
30 |
/var/www/localhost/htdocs/my_domain |
31 |
|
32 |
-- |
33 |
Michael Stewart vericgar@g.o |
34 |
Gentoo Developer http://dev.gentoo.org/~vericgar |
35 |
|
36 |
GnuPG Key ID 0x08614788 available on http://pgp.mit.edu |
37 |
-- |