Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to change to Here is what I've been trying:

I configurate the Virtual Server: server. I have still have default Network Listeners to be http-listener-1 and http-listner-2. I change the Default Web Module to ScholarActive#ScholarActive-war.war (The only option in the drop down list, since I only deploy 1 application).

For the docroot, I try this


or this


Both does not work. What does docroot need to point to, for this to work?

what I try to do is: when I type localhost:8080/ScholarActive-war, then my application load, I want to make so that if I type locahost:8080, it will load the app as well, then what left is changed the port to 80. But no luck. Any Idea?

share|improve this question

Please check for the following URLs, hope this can help you.

share|improve this answer
It help me how you set up gf to listen to port 80, but not sure about default project. However, i eventually figure it out. thank you +1 – Harry Pham Jan 15 '11 at 16:15

You're basically saying that you'd like to remove the context of the application and have the listener, which is listening on port 8080 currently, receive requests coming over port 80.

To remove the context myproject-war from open the admin console at and select Applications from the main menu. Select the application you are attempting to modify and change the Context Root: from myproject-war to /. This tells Glassfish to deploy the application to the root of the virtual server. You may need to restart the domain for the changes to take effect.

Now to remove the port 8080 from the request you need to either modify http-listener-1 to listen on port 80 which you can do by simply editing http-listener-1's port in the admin console under Configurations->server-config->Network Config->Network Listeners->http-listener-1. Where you see the port field, change it from 8080 to 80. However, this only works if you don't have any other applications listening on port 80. You may need to (if you're using linux) modify the iptables to forward all traffic coming through port 80 to port 8080 where http-listener-1 is listening. Checkout this webpage forwarding port 80 traffic to see how to do it... it's pretty simple.

Good Luck :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.