Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to use cometd / reverse ajax capability of Jetty 7. I tried to configure it so it listen to port 80, instead of 8080.

However, according to http://jetty.mortbay.org/jetty5/faq/faq%5Fs%5F200-General%5Ft%5Fapache.html ,

Apache can be configured as a HTTP/1.1 proxy to pass selected request to the Jetty using the HTTP/1.1 protocol. This is simple to configure and use, but current versions of the apache mod_proxy do not support persistent connections.

As far as I know, the reverse ajax in jetty is depending on continuation (I guess it is persistent connection). So how to let jetty support reverse ajax, while coexist with apache server?


share|improve this question
Is Jetty used standalone or embedded in the app? –  Alex N Nov 11 '09 at 2:55
I use it as a standalone webserver. –  janetsmith Nov 11 '09 at 5:16

3 Answers 3

Why not use mod_jk?

share|improve this answer
I am not familiar with apache configuration. However, a lot of blogs promote mod_proxy over mod_jk, and mod_proxy seems to be a more up-to-date technology. –  janetsmith Nov 11 '09 at 5:21
"mod_jk2 is an option on Apache setups prior to Apache 2.2 (e.g. RHEL4, Debian 3.1). It is not an option on newer setups (e.g. not on Centos5, FC5 or newer, Debian Etch, or Ubuntu 7.10). For the newer distros you would use mod_proxy instead." –  janetsmith Nov 11 '09 at 5:30
Ahh.. thx janet. It's been a while since I'd used it..thought it might still be valid. –  user6373 Nov 11 '09 at 12:45

If you invoke jetty with "java -Djetty.port=80 -jar start.jar" it should attach to port 80 instead.

You will require root priviledges under Unix.

share|improve this answer

From: http://docs.codehaus.org/display/JETTY/port80

  • Start Jetty as the root user, and use Jetty's setuid mechanism to switch to a non-root user after startup


  • Configure the server to run as a normal user on port 8080 (or some other non protected port).Then, configure the operating system to redirect port 80 to 8080 using ipchains, iptables, ipfw or a similar mechanism.

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.