Plesk and Container with Subdomains

痞子三分冷 提交于 2019-12-12 05:54:01

问题


How is it possible to setup a subdomain in Plesk to redirect the Request to a container on the system but with a different port. Example:

JBoss is running on port 8070 and domain.com:8070 shows the application. Now I want to add a subdomain to jboss.domain.com which points to domain.com:8070. I don't need just a redirect. I need a reverse proxy like nginx...but I don't know the right solution. Any suggestions?


回答1:


I'm going to answer the question by myself ;)

  • At first you have to install mod_proxy for the Apache Web Server under "Server" - "Tools and Settings" -> "General Settings" -> "Apache Web Server". Activate "proxy" and "proxy_http".

  • Second go to your subdomains "Web Server Settings" and fill in the following lines under "Additional directives for HTTP" (assuming that your Docker image runs on port 8070):

 ProxyPass / http://localhost:8070/  
 ProxyPassReverse / http://localhost:8070/


来源:https://stackoverflow.com/questions/31379934/plesk-and-container-with-subdomains

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!