Search code examples
javacentosglassfishglassfish-3centos6

Why Glassfish 3.1 on CentOs 6 can't serve port 80?


I have set my firewall setting for port 80, 8080, 4848. If on Glassfish I active listener for 80 it can't start and throws an error:

 Permission denied: 80=com.sun.enterprise.v3.services...

Solution

  • The ports 0 up to 1023 are called well-known ports. Glassfish would have to be executed with root privileges in order to bind to this port.

    Let Glassfish bind to 127.0.0.1:8080 or any other unprivileged port instead and use NGINX as a reverse proxy to map incoming requests on port 80 to your Glassfish server.