簡體   English   中英

兩種服務的HTTP Google計算引擎

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM