Mailing List Archive

Default server and virtual host in Apache1.3.22
Hi,
I am trying to configure 2 virtual host in apache
1.3.22 on windows 2000.
I am Using Name-based Virtual Hosts,
my default server name is
pfizer-maps, with DocumentRoot "C:/maps" and ipaddress
192.168.186.229
then i define 2 virtual host
they look some thing like this
NameVirtualHost 192.168.186.229
<VirtualHost 192.168.186.229>
ServerName as400-maps
DocumentRoot "C:/mapsjrun/pages"
</VirtualHost>
<VirtualHost 192.168.186.229>
ServerName testvh
DocumentRoot "C:/application/maps"
</VirtualHost>
every thing works fine for virtualhost, if i get
request by as400-maps name i go to its document root,
and if i get request testvh i go to its document root,

but when i get request as pfizer-maps i go to the
document root of as400-maps.
Now the question is, does apache work like this only,
i came accross a document at
http://httpd.apache.org/docs/mod/core.html#namevirtualhost
which has a statement
Note: the "main server" and any _default_ servers will
never be served for a request to a NameVirtualHost IP
Address
so what does this mean , can i access the server
default document root or not, i am a bit confused how
can i access my default server

Ashish

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

---------------------------------------------------------------------
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: Default server and virtual host in Apache1.3.22 [ In reply to ]
> -----Original Message-----
> From: Ashish kulkarni [mailto:kulkarni_ash13@yahoo.com]

> so what does this mean , can i access the server
> default document root or not, i am a bit confused how
> can i access my default server

No. Once you have a NameVirtualHost directive, the main server DocumentRoot
will *never* be used. (See the paragraph before "Compatability with Older
Browsers" in http://httpd.apache.org/docs/vhosts/name-based.html )

This is not a restriction, however. Just create a third <VirtualHost>
section with
ServerName pfizer-maps
and the same DocumentRoot as the main server. If you want it to be the
"default" virtualhost, then list it first in the config file.

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
RE: Default server and virtual host in Apache1.3.22 [ In reply to ]
Hi
Thanx Joshua for the solutions i got from u, now i
have to set tomcat4.0 with apache 1.3.22 with virtual
host are there any links of step by step insturction
where i can go and set this

Ashish
--- Joshua Slive <joshua@slive.ca> wrote:
>
>
> > -----Original Message-----
> > From: Ashish kulkarni
> [mailto:kulkarni_ash13@yahoo.com]
>
> > so what does this mean , can i access the server
> > default document root or not, i am a bit confused
> how
> > can i access my default server
>
> No. Once you have a NameVirtualHost directive, the
> main server DocumentRoot
> will *never* be used. (See the paragraph before
> "Compatability with Older
> Browsers" in
> http://httpd.apache.org/docs/vhosts/name-based.html
> )
>
> This is not a restriction, however. Just create a
> third <VirtualHost>
> section with
> ServerName pfizer-maps
> and the same DocumentRoot as the main server. If
> you want it to be the
> "default" virtualhost, then list it first in the
> config file.
>
> 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
>


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

---------------------------------------------------------------------
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: Default server and virtual host in Apache1.3.22 [ In reply to ]
> From: Ashish kulkarni [mailto:kulkarni_ash13@yahoo.com]

> Thanx Joshua for the solutions i got from u, now i
> have to set tomcat4.0 with apache 1.3.22 with virtual
> host are there any links of step by step insturction
> where i can go and set this

You're probably better off asking this on the tomcat users mailing list.

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