简体   繁体   English

通过Apache远程访问JBOSS管理控制台

[英]Access JBOSS management console remotely through Apache

I have an environment where the JBOSS server sits on a linux machine and it's services accessed via Apache server running there. 我有一个环境,其中JBOSS服务器位于Linux机器上,并且可以通过在该机器上运行的Apache服务器访问其服务。 I am not able access the JBOSS console as "http://:/console" 我无法以“ http://:/ console”访问JBOSS控制台

What changes apparently will I have to make in "httpd.conf" to access this url from outside. 为了从外部访问此URL,显然必须在“ httpd.conf”中进行哪些更改。

The safer way of accessing your JBoss console is through an ssh tunnel. 访问JBoss控制台的更安全方法是通过ssh隧道。 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. 并在端口7990上的本地计算机上使用远程服务器的控制台。

Opening console port on your web server is also a solution, but less secure one. 在Web服务器上打开控制台端口也是一种解决方案,但是安全性较差。

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 ProxyPass and 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. ProxyPassProxyPassReverse指令的作用是保留了域,因此您可以像对待JBoss一样处理cookie,而不会出现任何问题,并且可以正确跟踪会话。

The ProxyPassReverseCookiePath directive rewrites the path string in Set-Cookie headers. ProxyPassReverseCookiePath指令重写Set-Cookie标头中的路径字符串。 If the beginning of the cookie path matches internal-path , the cookie path will be replaced with public-path . 如果cookie路径的开头与internal-path path匹配,则cookie路径将被public-path替换。 And ProxyPassReverseCookieDomain rewrites the domain string in Set-Cookie headers. ProxyPassReverseCookieDomain在Set-Cookie标头中重写域字符串。

See more: 查看更多:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM