在CentOS 7 Apache 2上使用HTTPS Index.html而不是ProxyPass反向代理站点时

目标是外部用户可以通过HTTPS进行连接,通过Apache的基本身份validation,然后查看代理tomcat站点。

我已经build立了一个反向代理到一个运行在不同端口上的同一台机器上的tomcat服务器,使用基本authentication:(/etc/httpd/conf.d/vhost.conf)

NameVirtualHost *:80 <VirtualHost *:80> ServerName sub.domainx.co.uk ErrorLog "/var/log/proxy/domainx_prox_error_log" CustomLog "/var/log/proxy/domainx_prox_access_log" common ProxyRequests Off <Proxy *> Order deny,allow Deny from all Allow from all </Proxy> <Location /> AuthType Basic AuthName "Proxy Auth" AuthUserFile /var/www/syzygy-auth/CONFLUENCE/.htpasswd Require user ukuser Satisfy any Deny from all Allow from 192.168.0.0/21 </Location> ProxyPass / http://sub.domainx.co.uk:8090/ ProxyPassReverse / http://sub.domainx.co.uk:8090/ </VirtualHost> 

以上工作正常。

然后我开始在apache上设置mod_ssl

 yum -y install mod_ssl 

然后我上传了我的通配符ssl,并使dollow变成了/etc/httpd/conf.d/ssl.conf

 uncommented: DocumentRoot "/var/www/html" uncommented/updated: ServerName www.server.world:443 SSLCertificateFile /etc/pki/tls/certs/server.crt SSLCertificateKeyFile /etc/pki/tls/certs/server.key 

这些变化似乎已经达到了预期的效果。

我无法通过HTTPS和HTTP代理tomcat服务器来查看index.html。

当我添加一个相同的虚拟主机,但端口更改为443时,不会有任何更改生效。

当我添加SSLProxyEngine在Apache上不会启动。

我在代理错误日志中得到以下内容:

 Fatal error initialising mod_ssl, exiting. See /var/log/proxy/domainx_prox_error_log for more information Server should be SSL-aware but has no certificate configured 

事实certificate,ssl.conf中已经有了一个虚拟主机,它正在维护我的设置。 学校男孩错误。