* [gentoo-user] Help With vhost.conf apache2
@ 2006-03-11 10:33 Tito Valentin
2006-03-11 16:15 ` Haim Ashkenazi
2006-03-11 21:54 ` Michael Stewart (vericgar)
0 siblings, 2 replies; 4+ messages in thread
From: Tito Valentin @ 2006-03-11 10:33 UTC (permalink / raw
To: gentoo-user
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 webmaster@my_domain.com
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>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Help With vhost.conf apache2
2006-03-11 10:33 [gentoo-user] Help With vhost.conf apache2 Tito Valentin
@ 2006-03-11 16:15 ` Haim Ashkenazi
2006-03-12 12:17 ` Tito Valentin
2006-03-11 21:54 ` Michael Stewart (vericgar)
1 sibling, 1 reply; 4+ messages in thread
From: Haim Ashkenazi @ 2006-03-11 16:15 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]
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 webmaster@my_domain.com
> 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
--
Haim
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Help With vhost.conf apache2
2006-03-11 10:33 [gentoo-user] Help With vhost.conf apache2 Tito Valentin
2006-03-11 16:15 ` Haim Ashkenazi
@ 2006-03-11 21:54 ` Michael Stewart (vericgar)
1 sibling, 0 replies; 4+ messages in thread
From: Michael Stewart (vericgar) @ 2006-03-11 21:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]
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:
A quick guess without looking in detail at your config... if parts of
the virtual host are working, but the root isn't, then it makes me think
it's a cache issue. Clear your browser's cache and try the page again.
> /etc/apache2/vhosts.d/01_my_domain_vhost.conf
> <VirtualHost www.my_domain.com>
> ServerAdmin webmaster@my_domain.com
> 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>
You need to use <VirtualHost *:80>. The argument to a VirtualHost is the
NameVirtualHost that it matches to (NameVirtualHost *:80 should be in
the default config)
I would also suggest, using /var/www/my_domain/htdocs instead of
/var/www/localhost/htdocs/my_domain
--
Michael Stewart vericgar@gentoo.org
Gentoo Developer http://dev.gentoo.org/~vericgar
GnuPG Key ID 0x08614788 available on http://pgp.mit.edu
--
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Help With vhost.conf apache2
2006-03-11 16:15 ` Haim Ashkenazi
@ 2006-03-12 12:17 ` Tito Valentin
0 siblings, 0 replies; 4+ messages in thread
From: Tito Valentin @ 2006-03-12 12:17 UTC (permalink / raw
To: gentoo-user
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 webmaster@my_domain.com
>> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-03-12 12:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-11 10:33 [gentoo-user] Help With vhost.conf apache2 Tito Valentin
2006-03-11 16:15 ` Haim Ashkenazi
2006-03-12 12:17 ` Tito Valentin
2006-03-11 21:54 ` Michael Stewart (vericgar)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox