admin@glassfish.java.net

Re: GlassFish Virtual Domains

From: Muhammad Siraj Ghaffar <siraj.ghaffar_at_Sun.COM>
Date: Thu, 22 Jun 2006 13:10:12 -0400

This blog
<http://weblogs.java.net/blog/jfarcand/archive/2006/06/dynamically_add.html>
talks about configuring virtual servers using admin CLI adn admin
console. The blog has also been highlighted at The Acquarium
<http://blogs.sun.com/roller/page/theaquarium>

--Siraj

>
> Subject:
> GlassFish Virtual Domains
> From:
> Abhijit Kumar <Abhijit.Kumar_at_Sun.COM>
> Date:
> Wed, 21 Jun 2006 11:56:42 -0700
> To:
> admin_at_glassfish.dev.java.net
>
> To:
> admin_at_glassfish.dev.java.net
>
>
> This is in response to the following email from Dyego Souza Dantas
> Leal about virtual domains.
>
> https://glassfish.dev.java.net/servlets/ReadMsg?list=admin&msgNo=10
>
> Yes, it is possible to create virtual domains on GlassFish. For the
> example quoted in email, following configuration in domain.xml should
> work.
>
> <config dynamic-reconfiguration-enabled="true" name="server-config">
> <http-service>
> ...
> <http-listener acceptor-threads="1" address="200.200.200.200"
> blocking-enabled="false" default-virtual-server="jose" enabled="true"
> family="inet" id="port80" port="80" security-enabled="false"
> server-name="" xpowered-by="true">
> </http-listener>
> <http-listener acceptor-threads="1" address="200.200.200.200"
> blocking-enabled="false" default-virtual-server="jose" enabled="true"
> family="inet" id="port443" port="443" security-enabled="true"
> server-name="" xpowered-by="true">
> </http-listener>
> ...
> <virtual-server hosts="www.jose.org,jose.org"
> http-listeners="port80,port443" id="jose"
> log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
> <property name="docroot"
> value="${com.sun.aas.instanceRoot}/docroot"/>
> <property name="accesslog"
> value="${com.sun.aas.instanceRoot}/logs/access"/>
> </virtual-server>
> <virtual-server hosts="www.maria.org,maria.org"
> http-listeners="port80,port443" id="maria"
> log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
> <property name="docroot"
> value="${com.sun.aas.instanceRoot}/docroot"/>
> <property name="accesslog"
> value="${com.sun.aas.instanceRoot}/logs/access"/>
> </virtual-server>
> ...
> </http-service>
> ...
> </config>
>
> To summarize, you need to have two virtual server entries, one for
> each URL you are trying to serve. The example above also assumes that
> you are going to serve both http and https, so there are two different
> http listeners, one for port 80 and another for port 443.
>
> I am sure someone on this list can post instructions on how to do it
> using admin console or command line interface.
>
> Please try it out and let us know if it worked.
>
> Hope this helps,