我有一个运行Debian 7.5和Apache2的Linode服务器
我有以下文件存储在/etc/ssl/localcerts/目录中:
我在test-site.com.conf文件中的以下configuration位于/etc/apache2/sites-enabled/ :
<VirtualHost *:80> SSLEngine On SSLCertificateFile /etc/ssl/localcerts/www.test-site.com.crt SSLCertificateKeyFile /etc/ssl/localcerts/www.test-site.com.key SSLCertificateChainFile /etc/ssl/localcerts/intermediate.crt #SSLCACertificateFile /etc/ssl/localcerts/ca.pem # Admin email, Server Name (domain name), and any aliases ServerAdmin [email protected] ServerName www.test-site.com # ServerAlias test-site.com # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /home/user/public/test-site.com/public/ # Log file locations LogLevel warn ErrorLog /home/user/public/test-site.com/log/error.log CustomLog /home/user/public/test-site.com/log/access.log combined </VirtualHost>
任何人都可以识别我做错了什么? 所有的文件都设置正确,我想。 但是SSL安装似乎还没有奏效。
UPDATE
这是描述连接的图像:
以下是目录/etc/apache2/中ports.conf的内容:
# If you just change the port or add more ports here, you will likely also # have to change the VirtualHost statement in # /etc/apache2/sites-enabled/000-default # This is also true if you have upgraded from before 2.2.9-3 (ie from # Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and # README.Debian.gz Listen 80 <IfModule mod_ssl.c> # If you add NameVirtualHost *:443 here, you will also have to change # the VirtualHost statement in /etc/apache2/sites-available/default-ssl # to <VirtualHost *:443> # Server Name Indication for SSL named virtual hosts is currently not # supported by MSIE on Windows XP. NameVirtualHost *:443 Listen 443 </IfModule> <IfModule mod_gnutls.c> NameVirtualHost *:443 Listen 443 </IfModule>
首先你需要确保SSL mod已经启用
a2enmod ssl
那么你需要改变你的configuration是这样的:
<VirtualHost *:443> SSLEngine On SSLCertificateFile /etc/ssl/localcerts/www.test-site.com.crt SSLCertificateKeyFile /etc/ssl/localcerts/www.test-site.com.key SSLCertificateChainFile /etc/ssl/localcerts/intermediate.crt #SSLCACertificateFile /etc/ssl/localcerts/ca.pem # Admin email, Server Name (domain name), and any aliases ServerAdmin [email protected] ServerName www.test-site.com # ServerAlias test-site.com # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /home/user/public/test-site.com/public/ # Log file locations LogLevel warn ErrorLog /home/user/public/test-site.com/log/error.log CustomLog /home/user/public/test-site.com/log/access.log combined
(第一行改变)