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

This question is a followup to this one. I got Apache running on port 80 on one of my four IPs pretty easily. Now I need to run Maven on port 80 on another IP. Running Maven on port 80 is already difficult enough; I have no idea how to define a specific IP. Any ideas on how to do this? Perhaps ipchains or iptables would be the easiest?

share|improve this question
up vote 0 down vote accepted

Yes, I'd guess that moving traffic from 80 to 8080 (or similar port) would be easiest:

iptables -t nat -I PREROUTING -d <localip> -p tcp -m tcp --dport 80 -j DNAT --to-destination <localip>:8080

share|improve this answer
Would --dport be 80, not 8080? – Theron Luhn Jul 11 '11 at 14:51
@Panthr you're correct, fixed it – Hubert Kario Jul 11 '11 at 14:54
Works like a charm! Thanks! – Theron Luhn Jul 11 '11 at 15:20

I would set up Apache to act as a reverse proxy for Maven

Inside your virtualhost (presuming maven is bound to localhost port 8080):

ProxyPass        /
ProxyPassReverse /
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.