users@glassfish.java.net

Re: How to stop or allow http traffic based on requested url dns informatio

From: <glassfish_at_javadesktop.org>
Date: Tue, 22 Jul 2008 08:38:40 PDT

"default-virtual-server" is a mandatory attribute as per the domain.xml DTD, but that should not prevent us from supporting an empty string as its value in order to disable the concept:

  <http-listener [...] default-virtual-server=""/>

This would be trivial to implement.

As for the purpose of the "hosts" attribute in virtual-server, it lists all the "Host" request headers that will be mapped to the virtual-server. This makes it possible to test virtual hosting without having to make any changes to DNS. For instance, if you have a virtual-server with a "hosts" attribute equal to "myhost", the following request would be mapped to it:

  GET /abc/def HTTP/1.1
  Host: myhost
[Message sent by forum member 'jluehe' (jluehe)]

http://forums.java.net/jive/thread.jspa?messageID=288450