<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot "D:/WWW/ansteelcn"
ServerAlias abri.ansteel.cn
ErrorLog "D:/BtSoft/wwwlogs/127.0.0.1-error.log"
CustomLog "D:/BtSoft/wwwlogs/127.0.0.1-access.log" combined
#HTTP_TO_HTTPS_START
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}$1 [L,R=301]
</IfModule>
#HTTP_TO_HTTPS_END
#SECURITY-START 防盗链配置
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !abri.ansteel.cn [NC]
RewriteRule .(jpg|jpeg|gif|png|js|css) /404.html [R=404,NC,L]
#SECURITY-END
#redirect 重定向
IncludeOptional conf/redirect/127.0.0.1/*.conf
#proxy 反向代理
IncludeOptional conf/proxy/127.0.0.1/*.conf
ErrorDocument 404 /404.html
#DENY FILES
<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
Order allow,deny
Deny from all
</Files>
#PHP
Include conf/php/74.conf
#PATH
<Directory "D:/WWW/ansteelcn">
Options FollowSymLinks ExecCGI
AllowOverride All
Require all granted
DirectoryIndex index.php default.php index.html index.htm default.html default.htm
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@example.com
DocumentRoot "D:/WWW/ansteelcn"
ServerAlias abri.ansteel.cn
ErrorLog "D:/BtSoft/wwwlogs/127.0.0.1-error.log"
CustomLog "D:/BtSoft/wwwlogs/127.0.0.1-access.log" combined
#redirect 重定向
IncludeOptional conf/redirect/127.0.0.1/*.conf
#proxy 反向代理
IncludeOptional conf/proxy/127.0.0.1/*.conf
ErrorDocument 404 /404.html
#SSL
SSLEngine On
SSLCertificateFile conf/ssl/127.0.0.1/fullchain.pem
SSLCertificateKeyFile conf/ssl/127.0.0.1/privkey.pem
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
#DENY FILES
<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
Order allow,deny
Deny from all
</Files>
#PHP
Include conf/php/74.conf
#PATH
<Directory "D:/WWW/ansteelcn">
Options FollowSymLinks ExecCGI
AllowOverride All
Require all granted
DirectoryIndex index.php default.php index.html index.htm default.html default.htm
</Directory>
</VirtualHost> |