在Apache Ubuntu服务器上设置SSL

我正在Ubuntu服务器上首次设置SSL证书。 我已经购买了一个专用IP地址,并已经在secure.example.com的子域名下购买了该证书

端口443是打开的,并被apache收听,并使用在线服务器来检查secure.example.com域显示证书似乎设置和工作正常。 这是我的域的configuration:

<VirtualHost *:80> .. </VirtualHost> <VirtualHost 109.228.xx:443> DocumentRoot /var/www/example.com ServerName secure.example.com SSLEngine on SSLCertificateFile /etc/apache2/ssl/secure.example.com.crt SSLCertificateKeyFile /etc/apache2/ssl/secure.example.com.key SSLCertificateChainFile /etc/apache2/ssl/Intermediate.crt <Directory "/var/www/example.com"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> 

但是,当我转到https://secure.example.com时,它将redirect到http://secure.example.com,显示默认的“It works!”。 因为它没有configuration。 我无法看到任何错误日志中的任何内容,我不知道该从哪里去。

谢谢你的帮助。