我知道有类似的问题。我尝试了他们的解决方案,甚至在提问之前尝试评论过一个。登录之前,Chrome 显示连接没有 SSL。https://i.stack.imgur.com/j5K94.png
这是我的代码
<VirtualHost *:80>
ServerName http://dev.udorm.io
ServerAlias http://dev.udormio.com
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://dev.udorm.io$1 [R,L]
</VirtualHost>
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/dev.udorm.io/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/dev.udorm.io/chain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/dev.udorm.io/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ServerName http://dev.udorm.io
ServerAlias http://dev.udormio.com
ProxyPreserveHost On
ProxyPass / http://localhost:1337/
ProxyPassReverse / http://localhost:1337/
<Proxy *>
AuthType Basic
AuthName "Udormio Dev Server"
AuthUserFile "/var/www/.htpasswd"
Require valid-user
</Proxy>
</VirtualHost>
相关日志条目
[Fri Nov 13 12:20:55.984955 2015] [ssl:warn] [pid 4632] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri Nov 13 01:57:12.010818 2015] [proxy:error] [pid 3295] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:1337 (localhost) failed
[Fri Nov 13 01:57:12.010855 2015] [proxy:error] [pid 3295] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Fri Nov 13 01:57:12.010862 2015] [proxy_http:error] [pid 3295] [client 96.50.74.147:52396] AH01114: HTTP: failed to make connection to backend: localhost, referer: https://dev.udorm.io/
[Fri Nov 13 12:20:56.002792 2015] [ssl:warn] [pid 4632] AH01909: RSA certificate configured for ip-10-0-0-5.ec2.internal:443 does NOT include an ID which matches the server name