You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Re...@aol.com on 2004/08/06 15:58:39 UTC
[users@httpd] Virtual hosting
Dear friends,
I am trying to host web sites on apache server 2 on windows 2000.as a
service, On my local machine.Now plan to host web sites so that they can be seen on
internet.
For name based virtual hosting.I entered following directive.of first web
site domain, which is a registered domain.
<VirtualHost>
NameVirtualHost *
<VirtualHost *>
ServerName www.doctorbush.com
DocumentRoot /www/doctorbush
</VirtualHost>
<VirtualHost *>
ServerName www.doctorbushsecond.com
DocumentRoot /www/otherdomain
</VirtualHost>
I have files for each site in separate directory, for example like
c://homesite/website is the directory where all the files of first web site
are locatted.
As http://localhost I am seeing the files.
I browsed
http://httpd.apache.org/docs-2.0/platform/windows.html couldn't get the
answer.
What else directive I need to enter so that the directories of each web site
will be browsed over the internet.
Guidance, please.
Re: [users@httpd] Virtual hosting
Posted by Blain Sadler <bl...@tradedesksoftware.com>.
As its name implies, name-based virtual hosting is NAME based.
This means that if a browser requests a document from http://example.com
it will get the virtual host for example.com. if you request
http://example2.com you will get the example2.com virtual host. If you
enter a name that is not defined in your configuration (like
http://localhost) or an ip address, you will just get the first virtual
host defined in your configuration.
if you want to be able to see both from localhost, just add example.com
and example2.com in your hosts file and point them to 127.0.0.1.
Remember14a@aol.com wrote:
> Dear friends,
>
> I am trying to host web sites on apache server 2 on windows 2000.as a
> service, On my local machine.Now plan to host web sites so that they
> can be seen on internet.
>
> For name based virtual hosting.I entered following directive.of first
> web site domain, which is a registered domain.
>
> <VirtualHost>
>
>
> NameVirtualHost *
>
> <VirtualHost *>
> ServerName www.doctorbush.com <http://www.doctorbush.com>
> DocumentRoot /www/doctorbush
> </VirtualHost>
>
> <VirtualHost *>
> ServerName www.doctorbushsecond.com <http://www.doctorbushsecond.com>
> DocumentRoot /www/otherdomain
> </VirtualHost>
>
> I have files for each site in separate directory, for example like
> c://homesite/website is the directory where all the files of first
> web site are locatted.
>
> As http://localhost I am seeing the files.
> I browsed
> http://httpd.apache.org/docs-2.0/platform/windows.html couldn't get
> the answer.
>
> What else directive I need to enter so that the directories of each
> web site will be browsed over the internet.
>
> Guidance, please.
>
>
>
--
Blain Sadler
Software Developer
TradeDesk Software Corporation
8 Diane Drive
Essex Junction, VT 05452-4008
phone: (802) 655-2777
e-mail: blain.sadler@tradedesksoftware.com
---------------------------------------------------------------------
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