Web apache反向代理中的句柄位置头
我正在使用Apache/2.4.29(Ubuntu),需要将其配置为内部web服务器的反向代理服务器。我的虚拟主机配置如下所示Web apache反向代理中的句柄位置头,web,server,proxy,reverse,internals,Web,Server,Proxy,Reverse,Internals,我正在使用Apache/2.4.29(Ubuntu),需要将其配置为内部web服务器的反向代理服务器。我的虚拟主机配置如下所示 ServerName web.example.com ServerAlias web.example.com ProxyRequests off ProxyPreserveHost On ProxyPass / http://192.168.1.15/web/public/ ProxyPassRevers
ServerName web.example.com
ServerAlias web.example.com
ProxyRequests off
ProxyPreserveHost On
ProxyPass / http://192.168.1.15/web/public/
ProxyPassReverse / http://192.168.1.15/web/public/
ProxyPassReverseCookiePath / /
<Location "/">
Order allow,deny
Allow from all
</Location>
ErrorLog ${APACHE_LOG_DIR}/web-error.log
CustomLog ${APACHE_LOG_DIR}/web-access.log combined
ServerName web.example.com
ServerAlias web.example.com
代理请求关闭
代理主机
ProxyPass/http://192.168.1.15/web/public/
ProxyPassReverse/http://192.168.1.15/web/public/
ProxyPassReverseCokiePath//
命令允许,拒绝
通融
ErrorLog${APACHE_LOG_DIR}/web-error.LOG
CustomLog${APACHE\u LOG\u DIR}/web-access.LOG组合
预期结果:
和
实际结果:
当我卷曲URL时。。
$curl-v
- 正在尝试10.0.0.1
- TCP_节点集
- 已连接到web.example.com(10.0.0.1)端口80(#0)
- GET/HTTP/1.1
- 主持人:web.example.com
- 用户代理:curl/7.58.0
- 接受:/
- 找到HTTP/1.1 302
- 日期:2020年8月30日星期日13:28:09 GMT
- 服务器:Apache/2.4.29(Ubuntu)
- 缓存控制:无缓存,私有
- 地点:
- 内容长度:522
- 内容类型:text/html;字符集=UTF-8