我需要在google计算引擎上的相同实例中启动两个服务HTTP (Apache HTTP和Glassfish HTTP,都是端口80)。我已经寻找了端口转发和ip,但发现它们都非常混乱。有没有人需要这样的环境?你能一步一步地帮我吗?
发布于 2018-02-22 16:28:04
您不能在同一端口上启动两个服务。您需要将HTTP请求重定向到Tomcat。为了实现这一点,您需要将Apache配置为反向代理。在这里你可以阅读更多关于它的1。
这是从Apache文档2中提取的示例。
# mod_proxy setup.
ProxyRequests Off
ProxyPass /webapps http://localhost:8080
ProxyPassReverse /webapps http://localhost:8080
<Location "/webapps">
# Configurations specific to this location. Add what you need.
# For instance, you can add mod_proxy_html directives to fix
# links in the HTML code. See link at end of this page about using
# mod_proxy_html.
# Allow access to this proxied URL location for everyone.
Order allow,deny
Allow from all
</Location>在这里你可以找到一个逐步的教程。
https://stackoverflow.com/questions/44486187
复制相似问题