# HTTP 配置,监听端口 80,并重定向到 HTTPS
ServerName demo.chenx221.cyou
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
# HTTPS 配置,监听端口 443
ServerName demo.chenx221.cyou
DocumentRoot "/var/www/html/web"
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
LimitRequestBody 2147483648
SSLEngine on
SSLCertificateFile "/etc/ssl/fullchain1.pem"
SSLCertificateKeyFile "/etc/ssl/privkey1.pem"