【发布时间】:2020-05-07 23:43:37
【问题描述】:
我已经在 VPS 上的 Ubuntu 18.04 上设置了 apache2 - 我遇到了 SSL 证书问题,但无论如何,我已经将默认 conf 设置为反向代理到一个不安全的 docker 容器,目前正在运行一个测试节点应用程序(我最终想使用.net core。)这是conf文件中的设置:
<VirtualHost 77.68.7.249:443>
ServerName www.thegatehousewereham.com
ServerAlias *.thegatehousewereham.com
ServerAdmin webmaster@thegatehousewereham.com
ProxyPreserveHost On
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
<Proxy http://localhost:8000/*>
Order deny,allow
Allow from all
</Proxy>
我在浏览器中收到 403 禁止 - 我在 error.log 中看到:
[2020 年 1 月 21 日星期二 20:56:11.109712] [authz_core:error] [pid 1251:tid 140677341959936] [客户端 94.197.37.81:53133] AH01630:客户端被服务器配置拒绝:代理:http://localhost:8000/ [2020 年 1 月 21 日星期二 20:56:11.216718] [authz_core:error] [pid 1251:tid 140677493028608] [客户端 94.197.37.81:53133] AH01630:客户端被服务器配置拒绝:代理:http://localhost:8000/favicon.ico,引用者:@98765432 r
这可能是防火墙问题吗?
任何帮助表示赞赏。在这上面花了太长时间,只想继续。 谢谢, 安迪。
更新:我正在使用 apache 2.4,但我不确定该代理指令。我把它改成
<Proxy http://localhost:8000/*>
Require all granted
</Proxy>
现在我看到了:
[2020 年 1 月 21 日星期二 21:57:01.084817] [proxy:warn] [pid 6618:tid 139968717412096] [client 94.197.37.81:54689] AH01144: 没有协议处理程序对 URL / (scheme 'http' )。如果您使用的是 mod_proxy 的 DSO 版本,请确保代理子模块包含在使用 LoadModule 的配置中。 [2020 年 1 月 21 日星期二 21:57:01.169791] [proxy:warn] [pid 6618:tid 139968709019392] [client 94.197.37.81:54688] AH01144: 没有协议处理程序对 URL /favicon.ico 有效(方案'http' )。如果您使用的是 mod_proxy 的 DSO 版本,请确保代理子模块包含在使用 LoadModule 的配置中。参考:https://thegatehousewereham.com/
我不确定这是一种改进,但它有所不同。
【问题讨论】:
标签: apache docker proxy apache2 reverse