yii2-netdisk/conf/apache.conf

24 lines
666 B
ApacheConf
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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