使用SSL的Apache2 conf文件导致ERR_CONNECTION_REFUSED

时间:2015-12-05 00:20:45

标签: apache ubuntu ssl ssl-certificate

我正在尝试在Ubuntu 15.10机器上配置我的SSL证书。我已将证书文件和私钥安装在所需目录中:

SSLCertificateFile /etc/apache2/ssl-certs/pts.crt
SSLCertificateKeyFile /etc/apache2/ssl-certs/msk.key
SSLCertificateChainFile /etc/apache2/ssl-certs/intermediate.crt

当我sudo service apache2 restart时,我被提示Enter passphrase for SSL/TLS keys for www.mydomain.com:443 (RSA): ********,因为此过程报告没有错误,我假设我至少正确安装了证书和私钥,否则我会预计在这个阶段会出现错误。

我的问题是我在尝试加载网站时收到ERR_CONNECTION_REFUSED

这是我正在使用的SSL网站的VirtualHost条目的备份副本。这个文件有什么明显的问题吗?

我还应该补充一点,当我使用此配置时,不仅无法加载目标网站,而且还会导致此apache2框的所有其他网站也无法加载。有任何想法吗?

`<VirtualHost *:80>
ServerName mydomain.com
ServerAlias www.mydomain.com
ServerAdmin daniel@mydomain.com
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

<VirtualHost 172.30.30.21:443>
ServerName www.mydomain.com
ServerAlias mydomain.com
ServerAdmin me@mydomain.com
SSLEngine on
SSLProtocol all
SSLCertificateFile /etc/apache2/ssl-certs/pts.crt
SSLCertificateKeyFile /etc/apache2/ssl-certs/msk.key
SSLCertificateChainFile /etc/apache2/ssl-certs/intermediate.crt
DocumentRoot /home/apts/Dropbox/mydomain.com/ 
<Directory /home/apts/Dropbox/mydomain.com/>
<IfModule mod_rewrite.c>
<IfModule mod_ssl.c>
# <Location /squirrelmail>
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
# </Location>
</IfModule>
</IfModule>
SSLOptions +StrictRequire
Options +FollowSymLinks -Indexes +MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
SSLProtocol -all +TLSv1 +SSLv3
SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM  
SSLVerifyClient none
SSLProxyEngine off
</VirtualHost>`

0 个答案:

没有答案