You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Beth Curotto <bc...@abni.com> on 2005/06/07 22:13:14 UTC
[users@httpd] Name-based Virtual Host
I have setup 2 virtual hosts in httpd.conf
I have one external ip address being nat'd to an internal ip
I would like to use both websites directed to the same external, to then be
handled by httpd.conf.
Am I on target so far?
One of the Virtual Hosts is for - www.mowingandmore.net
The DNS info for this site is set through Network Solutions. It is pointing
to 66.196.225.50
But when I try website name it defaults to general/default DocumentRoot, not
the one I set in the VirtualHost
This is my Virtual Host setup in httpd.conf .......
NameVirtualHost 66.196.225.50
<VirtualHost *>
ServerSignature email
DirectoryIndex index.html index.htm
LogLevel debug
HostNameLookups off
</VirtualHost>
# Virtual Host 0
<VirtualHost 66.196.225.50>
DocumentRoot /var/www/html/abni
ServerName abni.com
ServerSignature email
</VirtualHost>
# Virtual Host 1
<VirtualHost 66.196.225.50>
DocumentRoot /var/www/html/mow
ServerName mowingandmore.net
ServerSignature email
</VirtualHost>
default DocumentRoot is /var/www/html
external ip is 66.196.225.50
Can someone tell me where I am missing the boat.
Thanks in advance, Beth
RE: [users@httpd] Name-based Virtual Host
Posted by Beth Curotto <bc...@abni.com>.
More like this....?
NameVirtualHost *:80
# Virtual Host 1
<VirtualHost *:80>
ServerAlias www.mowingandmore.net
DocumentRoot /var/www/html/mow
ServerName mowingandmore.net
ServerSignature email
</VirtualHost>
Is there anywhere else on this box I need to note any virtual host info?
I am running under CentOS 3 (RHEL clone)
DNS info doesnt's have to point to :80 does it, just 66.196.225.50?
Thanks for the help
----------------------
-----Original Message-----
From: Joshua Slive [mailto:jslive@gmail.com]
Sent: Tuesday, June 07, 2005 3:21 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Name-based Virtual Host
On 6/7/05, Beth Curotto <bc...@abni.com> wrote:
>
> I have setup 2 virtual hosts in httpd.conf
> I have one external ip address being nat'd to an internal ip
> I would like to use both websites directed to the same external, to then
be
> handled by httpd.conf.
>
> Am I on target so far?
>
> One of the Virtual Hosts is for - www.mowingandmore.net
>
> The DNS info for this site is set through Network Solutions. It is
pointing
> to 66.196.225.50
> But when I try website name it defaults to general/default DocumentRoot,
not
> the one I set in the VirtualHost
>
> This is my Virtual Host setup in httpd.conf .......
>
> NameVirtualHost 66.196.225.50
The NameVirtualHost must refer to the IP address as seen from the
server -- behind the NAT. To avoid this complication, simply use
NameVirtualHost *:80 as recommended by the docs. Also use
<VirtualHost *:80> to match.
> # Virtual Host 1
> <VirtualHost 66.196.225.50>
> DocumentRoot /var/www/html/mow
> ServerName mowingandmore.net
> ServerSignature email
> </VirtualHost>
> Can someone tell me where I am missing the boat.
You are also missing a
ServerAlias www.mowingandmore.net
inside the <VirtualHost> container.
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
---------------------------------------------------------------------
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] Name-based Virtual Host
Posted by Joshua Slive <js...@gmail.com>.
On 6/7/05, Beth Curotto <bc...@abni.com> wrote:
>
> I have setup 2 virtual hosts in httpd.conf
> I have one external ip address being nat'd to an internal ip
> I would like to use both websites directed to the same external, to then be
> handled by httpd.conf.
>
> Am I on target so far?
>
> One of the Virtual Hosts is for - www.mowingandmore.net
>
> The DNS info for this site is set through Network Solutions. It is pointing
> to 66.196.225.50
> But when I try website name it defaults to general/default DocumentRoot, not
> the one I set in the VirtualHost
>
> This is my Virtual Host setup in httpd.conf .......
>
> NameVirtualHost 66.196.225.50
The NameVirtualHost must refer to the IP address as seen from the
server -- behind the NAT. To avoid this complication, simply use
NameVirtualHost *:80 as recommended by the docs. Also use
<VirtualHost *:80> to match.
> # Virtual Host 1
> <VirtualHost 66.196.225.50>
> DocumentRoot /var/www/html/mow
> ServerName mowingandmore.net
> ServerSignature email
> </VirtualHost>
> Can someone tell me where I am missing the boat.
You are also missing a
ServerAlias www.mowingandmore.net
inside the <VirtualHost> container.
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