0

I have an environment where the JBOSS server sits on a linux machine and it's services accessed via Apache server running there. I am not able access the JBOSS console as "http://:/console"

What changes apparently will I have to make in "httpd.conf" to access this url from outside.

Twaha Mehmood
  • 737
  • 3
  • 9
  • 26

2 Answers2

1

The safer way of accessing your JBoss console is through an ssh tunnel. Execute locally

ssh -L 7990:localhost:9990 username@your.jboss.server -N

and enjoy your remote server's console on your local machine on port 7990.

Opening console port on your web server is also a solution, but less secure one.

Alex Nevidomsky
  • 668
  • 7
  • 14
  • Actually I want to enable access to JBOSS console first and the neventually move on to remotely debugging it.. will this ssh be of any use then ? if so ... how – Twaha Mehmood Apr 19 '15 at 16:50
  • Remote debugging of JBoss is well covered topic, here's one link of many http://stackoverflow.com/questions/516196/jboss-debugging-in-eclipse If you can't do that or access your console, I conclude that your machine is secured. You have two choices then: a) to debug everything on your local machine before deploying to production (which is always the best scenario), or b) tunnel the required ports and follow the usual debugging steps. – Alex Nevidomsky Apr 19 '15 at 16:58
  • From your personal machine's command line, the one you are typing this on. Then you open the localhost:7990 in your browser and it looks like your server is responding from your local machine while it redirects your requests there via ssh. If you are using Windows you might need to install ssh (or putty.exe perhaps, it is named differently but does the trick, read the docs) - for a developer this is more or less a requirement anyway. – Alex Nevidomsky May 06 '15 at 07:17
0

Try with:

<Location /console>  
    ProxyPass http://localhost:9990  
    ProxyPassReverseCookiePath / /console/  
    ProxyPassReverseCookieDomain localhost <YOUR PUBLIC IP ADDRESS>  
</Location>  

<Location /console/>  
   ProxyPassReverse /  
</Location>  

ProxyPreserveHost On  

The thing with the ProxyPassand ProxyPassReverse directives is that it preserves the domain so you can handle cookies as is on JBoss side without any problems, and that sessions are tracked correctly.

The ProxyPassReverseCookiePath directive rewrites the path string in Set-Cookie headers. If the beginning of the cookie path matches internal-path, the cookie path will be replaced with public-path. And ProxyPassReverseCookieDomain rewrites the domain string in Set-Cookie headers.

See more:

Federico Sierra
  • 5,118
  • 2
  • 23
  • 36
  • Can anyone explain the above entries ... I have not worked on apache at all before this . ... so i need to understand tags and the elements above. – Twaha Mehmood Apr 27 '15 at 04:00