0

I have a problem configuring a remote virtual machine (with CentOS 5.5). I've installed LAMP, JasperServer and my company application (an industrial manager software), but this is my first remote VM.

The admin give me a static IP and 2 ports were redirected to SSH (11122 -> 22) and HTTP (11180 -> 80).

Now I have a problem to access the Jasper Reports panel from remote because I have to insert port 8080 to the domain and I have 11180 yet.

The solution I hypothesized is to edit httpd.conf, insert something to point to :8080/jasperserver but the main problem is that I can't have a static route because the company software runs on the "raw domain" like: //remoteip:11180/mysoftware.

I don't know if I'm being clear. I can't redirect all external requests from port 11180 to the internal port 8080 because my company software couldn't run.

Does anyone have some ideas?

PS: I can't enable anything like a firewall (iptables or something else). If there's another way that's a good solution too (the best is something to disable and enable when I need, like comment/uncomment some lines)

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
alex87alex
  • 21
  • 4

1 Answers1

0

As far as I can tell your software runs on port 8080 but you need it to be accessible from port 11180. You can redirect port 80 using apache with the following lines:

Redirect all traffic

ProxyPass / http://localhost:8180/
ProxyPassReverse / http://localhost:8180/

Redirect only a particular url (in this case /jasperserver)

ProxyPass /jasperserver http://localhost:8180/jasperserver
ProxyPassReverse /jasperserver http://localhost:8180/jasperserver

I tested this with a tomcat server which was not listening to localhost and the requests went through fine, so I would assume this would work fr you.

user254948
  • 469
  • 3
  • 10