【问题标题】:Httpd.conf redirect to external url apache tomcatHttpd.conf 重定向到外部 url apache tomcat
【发布时间】:2018-10-12 11:14:57
【问题描述】:

我有一个调用外部 URL 的应用程序。 当我尝试在 localhost 中运行它时,只会加载 localhost 中的一些静态 HTML 文件。

不会加载位于外部 URL 上的任何文件。它返回 404 未找到错误。

我正在使用 Apache 服务器和 Tomcat 来运行应用程序。

我的 Httpd.conf 文件有以下变化:

<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests On
ProxyVia On
ServerName localhost
ServerAlias *.localhost
ProxyPass /ab-ux-sass http://localhost:8080/ab-ux-sass
ProxyPassReverse /ab-ux-sass http://localhost:8080/ab-ux-sass
ProxyPass /ux-services https://boot.lender.com/ux-services
ProxyPassReverse /ux-services                    
                               https://boot.lender.com/ux-services
   </VirtualHost>

需要进行哪些配置更改?

【问题讨论】:

  • 请举例说明您尝试请求的 URL:哪些有效,哪些无效。
  • @ChristopherSchultz 现在可以正常工作了...最初本地主机链接可以正常工作,但 boot.lender.com 没有

标签: apache tomcat httpd.conf


【解决方案1】:

在 Httpd.conf 文件中进行了以下更改。它现在正在工作。

 <VirtualHost *:80>
  ServerName dev.localhost
  SSLProxyEngine on
  ProxyRequests Off
  <Proxy *>
   Order allow,deny
   Allow from All
 </Proxy>
   ProxyPass /ab-ux-sass http://localhost:8080/ab-ux-sass
   ProxyPassReverse /ab-ux-sass http://localhost:8080/ab-ux-sass
   ProxyPass /ux-services https://boot.lender.com/ux-services
   ProxyPassReverse /ux-services                    
                           https://boot.lender.com/ux-services
 </VirtualHost>

【讨论】:

    猜你喜欢
    • 2017-09-20
    • 1970-01-01
    • 1970-01-01
    • 2016-03-08
    • 2017-10-07
    • 2017-12-11
    • 2012-01-10
    • 2012-08-02
    • 1970-01-01
    相关资源
    最近更新 更多