且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Apache反向代理https到http

更新时间:2022-10-31 15:44:50

结果发现一些时髦的东西正在使用443端口.

Turns out something funky was going on in with 443 port.

httpd正在该端口上侦听,来自另一台计算机的nmap命令显示443打开,但由于某些原因,但是已设置RHEL 7的VM,但无法正常工作.

httpd was listening on that port, a nmap command from another machine showed 443 open but for some reason, however the VM of RHEL 7 was setup, it wasn't working.

因此,我切换了端口,下面是最终使我的https反向代理进入apache和http至Nexus repo的配置.

So I switched ports and below is the configuration that eventually got my reverse proxy to https into apache and http to my Nexus repo.

Nexus返回的网页带有http链接,无法获取该页面的内容,但是我只需要SSL即可获得不需要该网页的docker守护进程.

Nexus returns a webpage with http links that break getting the content for that page but I only need the SSL for a docker daemon which won't be asking for webpages.

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>