Skip to main content

virtual server with subdomain

4 replies [Last post]
mzin
Offline
Joined: 2009-08-18
Points: 0

Hello!
I got some a problem when setting up virtual server in glassfish v2.1
I want www.example.com and example.com serve by the default virtual server.
As now, www.example.com can display the page as excepted, but example.com displayed the page randomly to other subdomain's page E.G. mail.example.com, admin.example.com.

I think it is a normal behavior, because all the subdomain have example.com as suffix.

Could any one tell me how to set it up as I wish?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mzin
Offline
Joined: 2009-08-18
Points: 0

Thank you very much!!

I have solved my problem

coadetiloye
Offline
Joined: 2003-07-29
Points: 0

How did you solve...can you explain mzin ?

void_void

Please share your solution ..
:confused:

glassfish-2 wrote:
>
> How did you solve...can you explain mzin ?
> [Message sent by forum member 'coadetiloye' (coadetiloye@hotmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=364309
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>

--
View this message in context: http://old.nabble.com/virtual-server-with-subdomain-tp25021041p28217560....
Sent from the java.net - glassfish users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

kienvaser
Offline
Joined: 2007-10-10
Points: 0

I made something like that but with the webgui tool to admin the server.

The easiest way is when creating the virtual server add the hosts you want to serve by the virtual server. In your case:

[i]Hosts: www.example.com, example.com[/i]

After that you have to choose the default web module you want to serve.

If you want example.com to be redirected to www.example.com the way to solve is to create a virtual server for the host www.example.com with the default web module you want to serve and another virtual server for the host example.com. In this one you have to add a property [i]redirect_n[/i] with the value:

[i]from=/ url-prefix=http://www.example.com[/i]

Hope it helps!