You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mike W <mi...@crucis.net> on 2003/04/18 23:04:14 UTC
[users@httpd] Virtual Host document root problem
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have just upgraded from RH 7.3 with Apache 1.3.23 to RH 8.0 with
Apache 2.0.40. I've gone through the migration and have everything
running except for one thing. I can't seem to get the document root
for the virtual hosts to change---they always stay with the global
document root.
With Apache 2.0.*, do you remove the global documentRoot and just use
the ones in the VirtualHost containers?
Here are the ones I've added to httpd.conf...
# Default server
<VirtualHost *>
ServerAdmin me@mydomain.net
DocumentRoot /var/www/html
ServerName www.mydomain.net
</VirtualHost>
# 2nd server
<VirtualHost *>
ServerAdmin me@mydomain.net
DocumentRoot /var/www/html/2ndServerDir
Servername www.my2nd-domain.net
</VirtualHost>
My Virtual servers worked fine in 1.3.23.
Mike W
- --
Registered Linux - 256979
NRA Life
ARS: WØTMW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+oGhR5fq6h2uDDlQRArvyAJ9y8UM7AYMfT8t4x0/7KcTEFuwmyACg0ijI
4kFKxcM8Xene5ezeaBB7SA4=
=lrjN
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by F-Prot and MailScanner,
and is believed to be clean.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Virtual Host document root problem
Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 18 Apr 2003, Mike W wrote:
> > Do you have a
> > NameVirtualHost *
> > directive?
> >
> > Joshua.
> >
> No. Apache complained about having both name and IP based Vservers.
> The default SSL server is monitoring port 443. The complaints stopped
> when I commented out NameVirtualHost *.
You need the NameVirtualHost directive. If you want to do mixed name/port
based virtual hosting (necessary for SSL) then you need to specify an
explicit IP address as in
NameVirtualHost 127.0.0.1
and
<VirtualHost 127.0.0.1>
And no, you do not need to comment out the main DocumentRoot. It will
just be ignored when you get the virtual hosts working.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Virtual Host document root problem
Posted by Mike W <mi...@crucis.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 18 April 2003 04:22 pm, Joshua Slive wrote:
> On Fri, 18 Apr 2003, Mike W wrote:
> > I have just upgraded from RH 7.3 with Apache 1.3.23 to RH 8.0 with
> > Apache 2.0.40. I've gone through the migration and have everything
> > running except for one thing. I can't seem to get the document
> > root for the virtual hosts to change---they always stay with the
> > global document root.
> >
> > With Apache 2.0.*, do you remove the global documentRoot and just
> > use the ones in the VirtualHost containers?
> >
> > Here are the ones I've added to httpd.conf...
> > # Default server
> > <VirtualHost *>
>
> Do you have a
> NameVirtualHost *
> directive?
>
> Joshua.
>
No. Apache complained about having both name and IP based Vservers.
The default SSL server is monitoring port 443. The complaints stopped
when I commented out NameVirtualHost *.
Mike W
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project. See <URL:http://httpd.apache.org/userslist.html> for more
> info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
- --
Registered Linux - 256979
NRA Life
ARS: WØTMW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+oG4Y5fq6h2uDDlQRAtgWAKDoGHb+ZnaFCt2MnN1rle3WzqKSEwCggJxj
cVq12H5Bb9O/AJNTLysVbjU=
=Ius9
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by F-Prot and MailScanner,
and is believed to be clean.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Virtual Host document root problem
Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 18 Apr 2003, Mike W wrote:
> I have just upgraded from RH 7.3 with Apache 1.3.23 to RH 8.0 with
> Apache 2.0.40. I've gone through the migration and have everything
> running except for one thing. I can't seem to get the document root
> for the virtual hosts to change---they always stay with the global
> document root.
>
> With Apache 2.0.*, do you remove the global documentRoot and just use
> the ones in the VirtualHost containers?
>
> Here are the ones I've added to httpd.conf...
> # Default server
> <VirtualHost *>
Do you have a
NameVirtualHost *
directive?
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Virtual Host document root problem
Posted by Mike W <mi...@crucis.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 18 April 2003 04:27 pm, Dennis Speekenbrink wrote:
> Hi,
>
> Do you have:
>
> NameVirtualHost *
>
> In your httpd.conf file just above the VirtualHost definitions?
> And do your requests go to your global DocumentRoot, or to the first
> VirtualHost-DocumentRoot (which automatically acts as the
> default...)?
>
> Grtz,
> Dennis
>
> ># Default server
> ><VirtualHost *>
> > ServerAdmin me@mydomain.net
> > DocumentRoot /var/www/html
> > ServerName www.mydomain.net
> ></VirtualHost>
> >
> ># 2nd server
> ><VirtualHost *>
> > ServerAdmin me@mydomain.net
> > DocumentRoot /var/www/html/2ndServerDir
> > Servername www.my2nd-domain.net
> ></VirtualHost>
>
My global DocumentRoot is the same as my default. I'm wondering if I
should comment out the global DocumentRoot.
Mike W
- --
Registered Linux - 256979
NRA Life
ARS: WØTMW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+oG6S5fq6h2uDDlQRAjJXAKDtBCuCdfpzD2fizWDPdOres5hbOwCg41Tl
yX3+lFbO43IB7Jf0yNAOJp8=
=lApA
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by F-Prot and MailScanner,
and is believed to be clean.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Virtual Host document root problem
Posted by Dennis Speekenbrink <d....@student.utwente.nl>.
Hi,
Do you have:
NameVirtualHost *
In your httpd.conf file just above the VirtualHost definitions?
And do your requests go to your global DocumentRoot, or to the first
VirtualHost-DocumentRoot (which automatically acts as the default...)?
Grtz,
Dennis
># Default server
><VirtualHost *>
> ServerAdmin me@mydomain.net
> DocumentRoot /var/www/html
> ServerName www.mydomain.net
></VirtualHost>
>
># 2nd server
><VirtualHost *>
> ServerAdmin me@mydomain.net
> DocumentRoot /var/www/html/2ndServerDir
> Servername www.my2nd-domain.net
></VirtualHost>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org