apache 添加https后导致http无法访问

设置 config 设置 强制跳转

<VirtualHost *:80>
      DocumentRoot /usr/local/apache/htdocs/trip/public
      ServerName  域名
      ServerAlias 域名 
      DirectoryIndex index.php index.html
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://域名
</VirtualHost>
posted @ 2021-02-05 16:02  野香蕉  阅读(764)  评论(0编辑  收藏  举报