Haim,

Thanks for the help.  That is now working :-D

Haim Ashkenazi wrote:

On Sat, 2006-03-11 at 10:33 +0000, Tito Valentin wrote:
Hello All,

I am trying to get apache to work with a few vhost. The problem is that when I hit www.domain.com it shows the apache page rather than the actual site. In order for me to be able to view the site I have to type www.domain.dom/folder and then the site comes up. Here is what I have done so far with the vhost.conf files:

Apache2 on Gentoo

/etc/apache2/httpd.conf
        Include vhosts.d/00_default_vhost.conf
        Include vhosts.d/01_my_domain_vhost.conf

/etc/conf.d/apache2
        -D DEFAULT_VHOST (plus ssl and other)

/etc/apache2/vhosts.d/00_default_vhost.conf
        Default file with new domain information.

/etc/apache2/vhosts.d/01_my_domain_vhost.conf
        <VirtualHost www.my_domain.com>
                ServerAdmin [EMAIL PROTECTED]
                DocumentRoot /var/www/localhost/htdocs/parknorthcondos
                DirectoryIndex index.php index.html
                ServerName www.my_domain.com
                ErrorLog /var/log/apache2/vhosts/my_domain_error_log
                CustomLog /var/log/apache2/vhosts/my_domain_access_log common
        </VirtualHost>
HI

you have to have "NameVirtualHost *:80" before the first virtual host.
then the VirtualHost directive should be as follow:
<VirtualHost *:80>
        ServerName www.mydomain.com
        ...
</VirtualHost>

you have to do the same with ':443' if you want SSL virtual hosts.

the above instructions are for VirtualHosts running on the same IP. if
you want to run each virtual host on a separate IP you have to discard
the 'NameVirtualHost' directive and replace the '*' with ipaddress in
the 'VirtualHost' directive.

Bye
I just want to be able to hit www.my_domain.com and able to see my site instead of the apache splash page.

Any help is greatly appreciated.

Thanks,
Tito
--
gentoo-user@gentoo.org mailing list

Reply via email to