apache

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.localhost
    DocumentRoot "D:/EmpireServer/web"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/localhost-error_log"
</VirtualHost>

#80跳转443
<VirtualHost *:80>
ServerName your.domain.com #域名
RewriteEngine on #启用重定向
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1 [L,R]
</VirtualHost>
posted @ 2019-08-13 11:32  菜鸟web  阅读(152)  评论(0编辑  收藏  举报