Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've recent un-installed apache2 so I could run Tomcat6 on port 80 directly. I've been pulling my hair out trying to get this set up correctly.

I've read this post regarding setting up tomcat to use authbind. I tried that method, and instead of getting stacktrace errors in catalina.out, I just get a [fail] response on startup, with no output to the logs.

I tried binding tomcat directly to my server's IP address, and then editing /etc/authbind/byuid/ to include that IP address as suggested by enter link description here, but again, the [fail] response on startup with no logging.

The only way I could successfully get tomcat to start on port 80 was to run it as root, which I do not want to do.

What is the correct configuration to run tomcat6 on port 80 using authbind?

share|improve this question

If I run any java server that needs to serve up some web pages I generally do so using mod_proxy and have apache do the serving. Then my linux server becomes more multipurpose, as port 80 is controlled by a more language accepting application server.

Generally I run with apache/mod_proxy serving on 80 proxying to 8800(or some high port) for the java site, jboss running on 8800 and iptables configured to deny external requests to 8800.

share|improve this answer
same here, we proxy a few subdomains to Atlassian products (they run in tomcat containers). It's nice to also be able to host a few other sites on the box by using NameBased Virtual Hosts in apache – iainlbc Apr 13 '11 at 4:24
Definitely. I love multipurpose. This is almost a requirement when setting up machines for development anyhow - though even in prod I keep them the same (even if they're the only thing living on the server). – AndrewPK Apr 13 '11 at 4:29
I was doing this using mod_jk (not mod_proxy). However, I'm worried about our use of comet for pushing data and the way apache2 creates a new thread for every connection. I've read multiple places that using comet + apache will end up causing alot of issues. – aasukisuki Apr 13 '11 at 17:17
aasukusuki: I end up running apache as mpm_worker because of that reason. – AndrewPK Apr 15 '11 at 3:14

Are you sure your config is working at all? If it's failing to bind, then it should still start up, just missing certain listeners. Try setting your listener back to and see if it's still starting up.

Once you're that far, try this:

  • Change your listener to port 80 (setting it to a specific address won't help, so leaving it on is fine).

  • Modify /etc/default/tomcat6 to enable authbind.

Run the following:

sudo apt-get install authbind
sudo touch /etc/authbind/byport/80
sudo chown tomcat6:tomcat6 /etc/authbind/byport/80
share|improve this answer
Tried this, and while it looked promising at first, I'm back to getting the Permission denied <null>:80 error message in catalina.out – aasukisuki Apr 13 '11 at 2:33
Did you set AUTHBIND=yes and remove the # from the start of that line in /etc/default/tomcat6? – Shane Madden Apr 13 '11 at 2:48
yes sir. – aasukisuki Apr 13 '11 at 2:55

If you're already running a firewall on your host (by binding to 80 I'm assuming you are) you might try rerouting your traffic from 80 to 8080 by using iptables:

sudo /sbin/iptables -t nat -I PREROUTING -p tcp –dport 80 -j REDIRECT –to-port 8080

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.