Reputation: 31
I have GlassFish 4.0 and I want to host tow different websites on it by uploading war files,
So I have the first website in (web1.war) and the second website in (web2.war), How can I access them using (www.web1.com) and (www.web2.com) using GlassFish 4.0 server.
Assuming for sure that (www.web1.com) and (www.web2.com) are reserved domains for me and GlassFish 4.0 is installed on a public server with a public ip.
Upvotes: 1
Views: 1803
Reputation: 4963
There are lots of different things you need to configure here:
The GlassFish 4.0 administration guide [PDF] details how to use Virtual Servers to achieve this in section 14-2 and from 14-11 onwards.
The alternative way to do this is with Apache web server, which allows you to configure VHosts based on the URL used in the request. These requests can then be proxied to GlassFish. This configuration is equivalent to using GlassFish's virtual servers feature.
Upvotes: 3