Using Tomcat manager for multiple hosts over ssh

A

Austin

I have a single instance of tomcat running with multiple hosts.

I want to use tomcat manager with each host. I put manager.xml context
configuration file in the appBase for each Host and this works, I can
access the manager for each host using

http://{host}:8080/manager/

But for increased security I want to access the manager through ssh
tunnelling and not over the web. I set up RemoteAddrValve's to allow
127.0.0.1 only. This stopped the web access. I created an entry in
/etc/hosts to point {host} at 127.0.0.1 now I can view the manager in
the server browser only for each host.

So the hard bit is how to do this remotely.

I tried creating an ssh tunnel (local port 800, destination {a host},
destination port 8080)

On my local browser I used the url http://localhost:800/manager/.
Thinking the server would see this as http://{host}:8080/manager. but
it doesn't. tomcat does not appear to respond. I then changed the
tunnel destination host to ‘localhost' and this worked, tomcat
responded with localhost content (localhost is not the default
either). How can I do this for all the hosts and not just localhost.
Any ideas?

PS. I am a newbie almost, so easy to follow answers please.

Thanks in advance
 
A

Austin

I have a single instance of tomcat running with multiple hosts.

I want to use tomcat manager with each host. I put manager.xml context
configuration file in the appBase for each Host and this works, I can
access the manager for each host using

http://{host}:8080/manager/

But for increased security I want to access the manager through ssh
tunnelling and not over the web. I set up RemoteAddrValve's to allow
127.0.0.1 only. This stopped the web access. I created an entry in
/etc/hosts to point {host} at 127.0.0.1 now I can view the manager in
the server browser only for each host.

So the hard bit is how to do this remotely.

I tried creating an ssh tunnel (local port 800, destination {a host},
destination port 8080)

On my local browser I used the url http://localhost:800/manager/.
Thinking the server would see this as http://{host}:8080/manager. but
it doesn't. tomcat does not appear to respond. I then changed the
tunnel destination host to ?localhost' and this worked, tomcat
responded with localhost content (localhost is not the default
either). How can I do this for all the hosts and not just localhost.
Any ideas?

PS. I am a newbie almost, so easy to follow answers please.

Thanks in advance


i worked out how to do this. i set my browser proxy settings to proxy
through localhost port 800. then typed in the url for the host i
wanted.
the ssh tunnel is for local port 800, destination 127.0.0.1 port 8080

thats it, the server received the request as if i was on the server
itself, it had the host name in the http header so returned the
correct content.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top