Multiple Domains for GlassFish
Running Multiple Custom Domains on GlassFish Server
GlassFish provides enterprise-ready Java application hosting with an administration panel for application deployment, listener configuration, and virtual-server management.
Create the GlassFish Environment
1Open the environment wizard
Sign in to the platform dashboard and click Create environment or New Environment.
2Select GlassFish
Choose GlassFish as the application server, configure the required Cloudlet limits, enter the environment name, and click Create.
After provisioning is complete, the environment appears in the dashboard.
Configure and Bind the Domains
Create the required DNS records for every custom domain. Depending on the network setup, use a CNAME record or the appropriate A record.
3Open Custom Domains
Click Settings beside the environment and open the Custom Domains section.
4Bind every domain
Enter each domain and click Bind. The example uses myapplication.com and myapplication.org.
Deploy the Application
When the environment is created, the platform provides a link and credentials for the GlassFish DAS administration node.
5Open the GlassFish administration panel
Use the provided credentials to sign in and open the Applications section.
Deploy the required application package and confirm that the web module is available before creating the virtual server.
Create a GlassFish Virtual Server
6Open Virtual Servers
Navigate to Configurations > default-config > Virtual Servers and click New.
7Configure the virtual server
Complete the required fields and save the configuration.
myapplication.com,myapplication.org.
Save and Verify the Domains
8Save the configuration
Save the virtual-server settings. Restart GlassFish if the updated configuration is not applied automatically.
Open every configured domain in a browser. Each one should load the web module assigned to the new GlassFish virtual server.
