[英]Two Services HTTP google compute engine
我需要在Google计算引擎的同一实例中启动两个服务HTTP(Apache HTTP和Glassfish HTTP都为端口80)。 我已经在寻找端口转发和IP,但是发现它们非常令人困惑。 有没有人需要这种环境? 您可以逐步帮助我吗?
您不能在同一端口上启动两个服务。 您将需要将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>
在这里[3],您可以找到分步教程。
[1] https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html [2] https://wiki.apache.org/httpd/TomcatReverseProxy [3] https://rvdb.wordpress.com / 2012/04/26 / reverse-proxying-tomcat-webapps-behind-apache /
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.