The three files in the downloaded compressed package are copied to the D: / Apache2 / cert_apache folder (other paths are also available), and used in the following configuration.
httpd-vhosts.conf file, add:
<VirtualHost *:80>
DocumentRoot “D:/web”
<Directory “D:/web”>
Options -Indexes +FollowSymlinks
AllowOverride All
Require all granted
<VirtualHost *:443>
ServerName www.abc123.com
DocumentRoot “D:/web”
SSLEngine on
SSLProxyEngine on
SSLCertificateFile “D:/Apache2/cert_apache/xxxx_www.abc123.com_public.crt”
SSLCertificateKeyFile “D:/Apache2/cert_apache/xxxx_www.abc123.com.key”
httpd.conf file, open comment
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
Remember to open server 443 port access rights
Add http jump
https.htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L]
Original: https://blog.csdn.net/macwhirr123/article/details/86521931