[英]Apache Reverse Proxy https to http
我已经在这里和Internet上进行了大量的浏览,但是我无法配置我的Apache将代理https反向转换为http。 我觉得我已经接近了。 我遵循的所有示例似乎都适用于除我之外的所有人,并且我的设置非常简单。
<VirtualHost *:443>
ServerName myserver
SSLEngine On
SSLCertificateFile /path/to/file
SSLCertificateKeyFile /path/to/file
SSLCertificateChainFile /path/to/file
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
AddDefaultCharset Off
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://myserver:8081/
ProxyPassReverse / http://myserver:8081/
ErrorLog logs/myserver-error_log
CustomLog logs/myserver-access_log common
</VirtualHost>
因此,当我转到https:// myserver /时,我希望它重定向到运行Nexus的端口。
在执行SSL之前,这实际上是针对VirtualHost *:80的。 我可以去http:// myserver /并进入Nexus。 不知道为什么https不起作用。
实际发生的是https:// myserver /转到https:// myserver并显示测试index.html。我已经在DocumentRoot中进行了设置。
原来是时髦的,正在通过443端口进行操作。
httpd正在该端口上监听,来自另一台计算机的nmap命令显示443打开,但由于某些原因,但是已设置RHEL 7的VM,但无法正常工作。
因此,我切换了端口,下面是配置,最终使我的https反向代理进入apache,http进入我的Nexus存储库。
Nexus会返回一个带有http链接的网页,该网页可能无法获取该页面的内容,但是我只需要用于docker守护程序的SSL(不会要求该网页)。
Listen 8082
<VirtualHost *:8082>
ServerName myserver
SSLEngine On
SSLCertificateFile /path/to/file
SSLCertificateKeyFile /path/to/file
SSLCertificateChainFile /path/to/file
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
AddDefaultCharset Off
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://myserver:8081/
ProxyPassReverse / http://myserver:8081/
ErrorLog logs/myserver-error_log
CustomLog logs/myserver-access_log common
</VirtualHost>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.