You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Vlad Dolnik <vl...@am.amershambiosciences.com> on 2001/12/06 23:48:25 UTC

vhosting

Hello,

I have a problem to setup my virtual hosting.

I got Apache 1.3.14 running on Windows XP system. on a home network of
three computers connected to LinkSys DSL router(IP 192.168.1.1). I got a
registered domain  (changed) abcd.net and assigned static IP (changed)
111.22.33.44. On the internal system the IP for the web server computer is
192.168.1.201. I got two websites there on addresses http://abcd.net/dad
and http://abcd.net/mom with corresponding directories c:/web/dad/ and
c:/web/mom. I want the websites to be available as http://dad.abcd.net and
http://mom.abcd.net. I prefer not either to register any these two domains
or place them on my ISP's DNS server. I cannot use other ports such as 8080
because setting up this port on the router keeps other computers on the
network from getting on web. I would like to keep the main domain
functional, so that in fact one can use both addresses , e.g.,
http://dad.abcd.net and http://abcd.net/dad.

It looks like a textbook case. I consulted several books on Apache, the
Apache manual, some friends, and some related sites and found and tried
several configurations in my httpd.conf file. Unfortunately  none of them
worked for me when tested directly on the main computer. Below you can find
three unsuccessful configurations. I surely would appreciate help that will
allow me to setup virtual host and reason why this will work whereas the
others failed since I prefer to learn from my own errors not to repeat
them.

Thanks in advance.

Vlad Dolnik



Configuration 1

<VirtualHost *>
ServerAdmin dad@abcd.net
ServerName abcd.net
DocumentRoot C:/web
ErrorLog C:/web/logs/error_log
TransferLog C:/web/logs/access_log
</VirtualHost>

<VirtualHost *>
ServerAdmin dad@abcd.net
ServerName dad.abcd.net
DocumentRoot C:/web/dad
ErrorLog C:/web/dad/logs/error_log
TransferLog C:/web/dad/logs/access_log
</VirtualHost>

<VirtualHost *>
ServerAdmin dad@abcd.net
ServerName mom.abcd.net
DocumentRoot C:/web/mom
ErrorLog C:/web/mom/logs/error_log
TransferLog C:/web/mom/logs/access_log
</VirtualHost>


Configuration 2

Listen 80
NameVirtualHost 111.22.33.44
ServerName abcd.net

<VirtualHost  abcd.net>
ServerAdmin dad@abcd.net
ServerName abcd.net
DocumentRoot C:/web
ErrorLog C:/web/logs/error_log
TransferLog C:/web/logs/access_log
</VirtualHost>

<VirtualHost dad.abcd.net>
ServerAdmin dad@abcd.net
ServerName dad.abcd.net
DocumentRoot C:/web/dad
ErrorLog C:/web/dad/logs/error_log
TransferLog C:/web/dad/logs/access_log
</VirtualHost>

<VirtualHost  mom.abcd.net>
ServerAdmin dad@abcd.net
ServerName mom.abcd.net
DocumentRoot C:/web/mom
ErrorLog C:/web/mom/logs/error_log
TransferLog C:/web/mom/logs/access_log
</VirtualHost>


Configuration 3

Listen 80
ServerName abcd.net
NameVirtualHost 192.168.1.201

<VirtualHost 192.168.1.201>
ServerAdmin dad@abcd.net
Servername abcd.net
DocumentRoot C:/web
ErrorLog C:/web/logs/error_log
TransferLog C:/web/logs/access_log
</VirtualHost>

<VirtualHost 192.168.1.201>
ServerAdmin dad@abcd.net
Servername dad.abcd.net
DocumentRoot C:/web/dad
ErrorLog C:/web/dad/logs/error_log
TransferLog C:/web/dad/logs/access_log
</VirtualHost>

<VirtualHost 192.168.1.201>
ServerAdmin dad@abcd.net
Servername mom.abcd.net
DocumentRoot C:/web/mom
ErrorLog C:/web/mom/logs/error_log
TransferLog C:/web/mom/logs/access_log
</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
For additional commands, e-mail: users-help@httpd.apache.org


Re: vhosting

Posted by Chad Morland <ch...@inquent.com>.
If you only want to access these sites from your internal network you can
edit your hosts file (not sure where it is located in Windows) or setup an
internal dns server to run your network's own DNS. That way you wouldn't
have to talk to your ISP for every subdomain DNS change that you want to
make for your internal network. However way you decide to go about it you
must setup some type of name resolution before you can accomplish what you
are requesting. 

Just a couple alternate suggestions you can look into... ;)


.............................................
Chad Morland
Sr. UNIX Administrator
InQuent Technologies Inc.
T. 416-645-4554
F. 416-645-3920
www.inquent.com
.............................................



On Thu, 6 Dec 2001, RuneImp wrote:

> Where ever the Primary DNS server is has to add "dad" & "mom" as
> aliases (CNAME) to the domain "abcd.net". Then your apache setup
> will work. You HAVE to setup DNS first though. That is not an
> option (to my knowledge anyway). Configuration 1 is what I use,
> BTW.
> 
> 
> -=- RuneImp
> ImpTech - Web Design, Hosting & Computer Tech
> http://imptech.net
> rune@imptech.net
> 
> 
> ----- Original Message ----- 
> From: "Vlad Dolnik" <vl...@am.amershambiosciences.com>
> To: <us...@httpd.apache.org>
> Sent: Thursday, December 06, 2001 2:48 PM
> Subject: vhosting
> 
> 
> Hello,
> 
> I have a problem to setup my virtual hosting.
> 
> I got Apache 1.3.14 running on Windows XP system. on a home network of
> three computers connected to LinkSys DSL router(IP 192.168.1.1). I got a
> registered domain  (changed) abcd.net and assigned static IP (changed)
> 111.22.33.44. On the internal system the IP for the web server computer is
> 192.168.1.201. I got two websites there on addresses http://abcd.net/dad
> and http://abcd.net/mom with corresponding directories c:/web/dad/ and
> c:/web/mom. I want the websites to be available as http://dad.abcd.net and
> http://mom.abcd.net. I prefer not either to register any these two domains
> or place them on my ISP's DNS server. I cannot use other ports such as 8080
> because setting up this port on the router keeps other computers on the
> network from getting on web. I would like to keep the main domain
> functional, so that in fact one can use both addresses , e.g.,
> http://dad.abcd.net and http://abcd.net/dad.
> 
> It looks like a textbook case. I consulted several books on Apache, the
> Apache manual, some friends, and some related sites and found and tried
> several configurations in my httpd.conf file. Unfortunately  none of them
> worked for me when tested directly on the main computer. Below you can find
> three unsuccessful configurations. I surely would appreciate help that will
> allow me to setup virtual host and reason why this will work whereas the
> others failed since I prefer to learn from my own errors not to repeat
> them.
> 
> Thanks in advance.
> 
> Vlad Dolnik
> 
> 
> 
> Configuration 1
> 
> <VirtualHost *>
> ServerAdmin dad@abcd.net
> ServerName abcd.net
> DocumentRoot C:/web
> ErrorLog C:/web/logs/error_log
> TransferLog C:/web/logs/access_log
> </VirtualHost>
> 
> <VirtualHost *>
> ServerAdmin dad@abcd.net
> ServerName dad.abcd.net
> DocumentRoot C:/web/dad
> ErrorLog C:/web/dad/logs/error_log
> TransferLog C:/web/dad/logs/access_log
> </VirtualHost>
> 
> <VirtualHost *>
> ServerAdmin dad@abcd.net
> ServerName mom.abcd.net
> DocumentRoot C:/web/mom
> ErrorLog C:/web/mom/logs/error_log
> TransferLog C:/web/mom/logs/access_log
> </VirtualHost>
> 
> 
> Configuration 2
> 
> Listen 80
> NameVirtualHost 111.22.33.44
> ServerName abcd.net
> 
> <VirtualHost  abcd.net>
> ServerAdmin dad@abcd.net
> ServerName abcd.net
> DocumentRoot C:/web
> ErrorLog C:/web/logs/error_log
> TransferLog C:/web/logs/access_log
> </VirtualHost>
> 
> <VirtualHost dad.abcd.net>
> ServerAdmin dad@abcd.net
> ServerName dad.abcd.net
> DocumentRoot C:/web/dad
> ErrorLog C:/web/dad/logs/error_log
> TransferLog C:/web/dad/logs/access_log
> </VirtualHost>
> 
> <VirtualHost  mom.abcd.net>
> ServerAdmin dad@abcd.net
> ServerName mom.abcd.net
> DocumentRoot C:/web/mom
> ErrorLog C:/web/mom/logs/error_log
> TransferLog C:/web/mom/logs/access_log
> </VirtualHost>
> 
> 
> Configuration 3
> 
> Listen 80
> ServerName abcd.net
> NameVirtualHost 192.168.1.201
> 
> <VirtualHost 192.168.1.201>
> ServerAdmin dad@abcd.net
> Servername abcd.net
> DocumentRoot C:/web
> ErrorLog C:/web/logs/error_log
> TransferLog C:/web/logs/access_log
> </VirtualHost>
> 
> <VirtualHost 192.168.1.201>
> ServerAdmin dad@abcd.net
> Servername dad.abcd.net
> DocumentRoot C:/web/dad
> ErrorLog C:/web/dad/logs/error_log
> TransferLog C:/web/dad/logs/access_log
> </VirtualHost>
> 
> <VirtualHost 192.168.1.201>
> ServerAdmin dad@abcd.net
> Servername mom.abcd.net
> DocumentRoot C:/web/mom
> ErrorLog C:/web/mom/logs/error_log
> TransferLog C:/web/mom/logs/access_log
> </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
> 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
> 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
For additional commands, e-mail: users-help@httpd.apache.org


Re: vhosting

Posted by RuneImp <ru...@imptech.net>.
Where ever the Primary DNS server is has to add "dad" & "mom" as
aliases (CNAME) to the domain "abcd.net". Then your apache setup
will work. You HAVE to setup DNS first though. That is not an
option (to my knowledge anyway). Configuration 1 is what I use,
BTW.


-=- RuneImp
ImpTech - Web Design, Hosting & Computer Tech
http://imptech.net
rune@imptech.net


----- Original Message ----- 
From: "Vlad Dolnik" <vl...@am.amershambiosciences.com>
To: <us...@httpd.apache.org>
Sent: Thursday, December 06, 2001 2:48 PM
Subject: vhosting


Hello,

I have a problem to setup my virtual hosting.

I got Apache 1.3.14 running on Windows XP system. on a home network of
three computers connected to LinkSys DSL router(IP 192.168.1.1). I got a
registered domain  (changed) abcd.net and assigned static IP (changed)
111.22.33.44. On the internal system the IP for the web server computer is
192.168.1.201. I got two websites there on addresses http://abcd.net/dad
and http://abcd.net/mom with corresponding directories c:/web/dad/ and
c:/web/mom. I want the websites to be available as http://dad.abcd.net and
http://mom.abcd.net. I prefer not either to register any these two domains
or place them on my ISP's DNS server. I cannot use other ports such as 8080
because setting up this port on the router keeps other computers on the
network from getting on web. I would like to keep the main domain
functional, so that in fact one can use both addresses , e.g.,
http://dad.abcd.net and http://abcd.net/dad.

It looks like a textbook case. I consulted several books on Apache, the
Apache manual, some friends, and some related sites and found and tried
several configurations in my httpd.conf file. Unfortunately  none of them
worked for me when tested directly on the main computer. Below you can find
three unsuccessful configurations. I surely would appreciate help that will
allow me to setup virtual host and reason why this will work whereas the
others failed since I prefer to learn from my own errors not to repeat
them.

Thanks in advance.

Vlad Dolnik



Configuration 1

<VirtualHost *>
ServerAdmin dad@abcd.net
ServerName abcd.net
DocumentRoot C:/web
ErrorLog C:/web/logs/error_log
TransferLog C:/web/logs/access_log
</VirtualHost>

<VirtualHost *>
ServerAdmin dad@abcd.net
ServerName dad.abcd.net
DocumentRoot C:/web/dad
ErrorLog C:/web/dad/logs/error_log
TransferLog C:/web/dad/logs/access_log
</VirtualHost>

<VirtualHost *>
ServerAdmin dad@abcd.net
ServerName mom.abcd.net
DocumentRoot C:/web/mom
ErrorLog C:/web/mom/logs/error_log
TransferLog C:/web/mom/logs/access_log
</VirtualHost>


Configuration 2

Listen 80
NameVirtualHost 111.22.33.44
ServerName abcd.net

<VirtualHost  abcd.net>
ServerAdmin dad@abcd.net
ServerName abcd.net
DocumentRoot C:/web
ErrorLog C:/web/logs/error_log
TransferLog C:/web/logs/access_log
</VirtualHost>

<VirtualHost dad.abcd.net>
ServerAdmin dad@abcd.net
ServerName dad.abcd.net
DocumentRoot C:/web/dad
ErrorLog C:/web/dad/logs/error_log
TransferLog C:/web/dad/logs/access_log
</VirtualHost>

<VirtualHost  mom.abcd.net>
ServerAdmin dad@abcd.net
ServerName mom.abcd.net
DocumentRoot C:/web/mom
ErrorLog C:/web/mom/logs/error_log
TransferLog C:/web/mom/logs/access_log
</VirtualHost>


Configuration 3

Listen 80
ServerName abcd.net
NameVirtualHost 192.168.1.201

<VirtualHost 192.168.1.201>
ServerAdmin dad@abcd.net
Servername abcd.net
DocumentRoot C:/web
ErrorLog C:/web/logs/error_log
TransferLog C:/web/logs/access_log
</VirtualHost>

<VirtualHost 192.168.1.201>
ServerAdmin dad@abcd.net
Servername dad.abcd.net
DocumentRoot C:/web/dad
ErrorLog C:/web/dad/logs/error_log
TransferLog C:/web/dad/logs/access_log
</VirtualHost>

<VirtualHost 192.168.1.201>
ServerAdmin dad@abcd.net
Servername mom.abcd.net
DocumentRoot C:/web/mom
ErrorLog C:/web/mom/logs/error_log
TransferLog C:/web/mom/logs/access_log
</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
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: vhosting

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 6 Dec 2001, Vlad Dolnik wrote:

> Hello,
>
> I have a problem to setup my virtual hosting.
>
> I got Apache 1.3.14 running on Windows XP system. on a home network of
> three computers connected to LinkSys DSL router(IP 192.168.1.1). I got a
> registered domain  (changed) abcd.net and assigned static IP (changed)
> 111.22.33.44. On the internal system the IP for the web server computer is
> 192.168.1.201. I got two websites there on addresses http://abcd.net/dad
> and http://abcd.net/mom with corresponding directories c:/web/dad/ and
> c:/web/mom. I want the websites to be available as http://dad.abcd.net and
> http://mom.abcd.net. I prefer not either to register any these two domains
> or place them on my ISP's DNS server.

That can't be done without having either the specific names in DNS or
having a wildcard dns entry for *.abcd.net.  If the name isn't associated
with the IP address, there is no way that a browser can find it, so any
apache configuration will be pointless.

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
For additional commands, e-mail: users-help@httpd.apache.org