繁体   English   中英

Apache2反向代理首先安装永久加载

[英]Apache2 reverse proxy first install loading forever

我已经浏览了整个互联网,但找不到任何适合我的解决方案,这让我发疯。

我尝试使用 Tomcat8 和 Apache2 配置服务器。 所以我已经安装了 Tomcat8(它正在运行),现在我的 Apache 出现了问题(它正在运行)。

但是现在我正在尝试从 apache2 到我的 Tomcat8 做一个反向代理。

所以我配置了这个文件:/etc/apache2/sites-available/www.bloombooking.ca.conf

<VirtualHost *:80>
       ServerName www.bloombooking.ca
       ProxyPreserveHost On
       ProxyRequests On
       ProxyPass / http://144.217.85.74/
       ProxyPassReverse / http://144.217.85.74:8080
</VirtualHost>

但是,当我尝试访问我的 URL 时,它会永远加载,并且收到此消息:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: Error reading from remote server

我查看了日志,这是我得到的:

[Wed Dec 07 15:36:26.302595 2016] [proxy_http:error] [pid 18024:tid 139855795246848] (70007)The timeout specified has expired: [client 144.217.85.74:41866] AH01102: error reading status line from remote server 144.217.85.74:80
[Wed Dec 07 15:36:26.302604 2016] [proxy:error] [pid 18024:tid 139855795246848] [client 144.217.85.74:41866] AH00898: Error reading from remote server returned by /
[Wed Dec 07 15:36:26.302762 2016] [proxy_http:error] [pid 18024:tid 139855803639552] (70007)The timeout specified has expired: [client 144.217.85.74:41867] AH01102: error reading status line from remote server 144.217.85.74:80, referer: http://www.bloombooking.ca/
[Wed Dec 07 15:36:26.302781 2016] [proxy:error] [pid 18024:tid 139855803639552] [client 144.217.85.74:41867] AH00898: Error reading from remote server returned by /favicon.ico, referer: http://www.bloombooking.ca/
[...]

有人可以帮帮我吗 ?

确保在您的配置中,端口与 ProxyPass 和 ProxyPassReverse 对齐

<VirtualHost *:80>
       ServerName www.bloombooking.ca
       ProxyPreserveHost On
       ProxyRequests On
       ProxyPass "/" "http://an.ip.add.res:8080/"
       ProxyPassReverse "/" "http://an.ip.add.res:8080/"
</VirtualHost>

代理通行证

ProxyPass 指令指定传入请求到后端服务器的映射

代理密码反向

为确保从后端生成的和 Location: 标头被修改为指向反向代理,而不是返回到自身,通常需要 ProxyPassReverse 指令

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM