我在虚拟托管服务器上安装了 OpenSuSE,运行多个虚拟网站。在正常的 http 上一切正常。除了 http 之外,我现在还想在 https 上运行我的一个虚拟站点。因此,我购买了 SSL 证书。我已将我的证书文件复制到服务器:
SSLCertificateFile /etc/apache2/crt/site.crt
SSLCertificateKeyFile /etc/apache2/key/my.key
SSLCACertificateFile /etc/apache2/ca.txt
Run Code Online (Sandbox Code Playgroud)
我在文件“/etc/sysconfig/apache2”中的 Apache 模块中启用了 SSL
APACHE_MODULES="rewrite actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5 reqtimeout authn_core authz_core alias_module headers"
Run Code Online (Sandbox Code Playgroud)
在 /etc/apache2 我的 listen.conf 说:
Listen 80
<IfDefine SSL>
<IfDefine !NOSSL>
<IfModule mod_ssl.c>
Listen 443
</IfModule>
</IfDefine>
</IfDefine>
Run Code Online (Sandbox Code Playgroud)
我的 vhost 配置文件说:
<IfDefine SSL>
<IfDefine !NOSSL>
<VirtualHost *:443>
DocumentRoot "/srv/www/vhosts/dialogis-mediation.de/"
ServerName dialogis.coach:443
ServerAdmin juergen.tolksdorf@mac.com
ErrorLog …Run Code Online (Sandbox Code Playgroud)