1

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?

Theron Luhn
  • 325
  • 2
  • 3
  • 11

2 Answers2

1

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

Hubert Kario
  • 6,361
  • 6
  • 36
  • 65
0

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        / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
jamespo
  • 1,698
  • 12
  • 12