i-netsource.de

Web development / Java / JSF / Hibernate / SQL …

Run Glassfish without beeing root on Port 80

Hi,

if you try to run Glassfish on Port 80 without beeing root, that will fail.
It fails because of security reason. Non-root user cannot access ports under 1024.

First and often found way is to change you Iptables, which you can do like that.

But that did not really work for me. I did not want my wordpress links look like /wordpress:8080/someContent/
if i changed the admin settings to my default domain, that causes an endless loop…

so i choosed another way, called authbind.
Authbind lets you bind ports without beeing root. So we need to install authbind first and create a dummy file, to grant access to the user u would like to.

You now need to edit your /etc/init.d/glassfish file and add the auhtbind stuff:

We are finally done :)
What we need to do is to add a quite special entry to our domain.xml (or you do it within the admin panel)
Sorrily it will not work for IPv6 (see: Sun Bug Id 6771022 for more details)
So just open your domain.xml and add

That should do the trick!
Have Fun!

, , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

789 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">