打开httpd.conf文件,移除注释的行:
Include conf/extra/httpd-ahssl.conf
LoadModule ssl_module modules/mod_ssl.so
ServerName abc.com:80
打开httpd-ahssl.conf,修改如下:
<VirtualHost _default_:443>
SSLEngine on
ServerName abc.com:443 #主要修改一下这里
SSLCertificateFile "${SRVROOT}/conf/ssl/server.crt"
SSLCertificateKeyFile "${SRVROOT}/conf/ssl/server.key"
DocumentRoot "C:/AppServ/www"
# DocumentRoot access handled globally in httpd.conf
CustomLog "${SRVROOT}/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
<Directory "C:/AppServ/www">
Options Indexes Includes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</virtualhost>
Include conf/extra/httpd-ahssl.conf
LoadModule ssl_module modules/mod_ssl.so
ServerName abc.com:80
打开httpd-ahssl.conf,修改如下:
<VirtualHost _default_:443>
SSLEngine on
ServerName abc.com:443 #主要修改一下这里
SSLCertificateFile "${SRVROOT}/conf/ssl/server.crt"
SSLCertificateKeyFile "${SRVROOT}/conf/ssl/server.key"
DocumentRoot "C:/AppServ/www"
# DocumentRoot access handled globally in httpd.conf
CustomLog "${SRVROOT}/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
<Directory "C:/AppServ/www">
Options Indexes Includes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</virtualhost>
重启apache,输入