就是面板上 网站----->设置 -----配置文件
我安装ssl 后 强制全站301了 我像取消。
不是取消ssl 而是取消强制301。。。
下面这段删除就行吗?
- if ($server_port !~ 443){
- rewrite ^/.*$ https://$host$uri;
- }
- error_page 497 https://$host$uri;
复制代码
- server
- {
- listen 80;
- listen 443 ssl;
- server_name xxx.cn;
- index index.php index.html index.htm default.php default.htm default.html;
- root /www/wwwroot/xxx.cn;
- #error_page 404/404.html;
- ssl_certificate /etc/letsencrypt/live xxx.cn/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/ xxx.cn/privkey.pem;
- if ($server_port !~ 443){
- rewrite ^/.*$ https://$host$uri;
- }
- error_page 497 https://$host$uri;
- error_page 404 /404.html;
- error_page 502 /502.html;
-
- include enable-php-52.conf;
- include /www/server/panel/vhost/rewrite/xxx.cn.conf;
- location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 30d;
- access_log off;
- }
- location ~ .*\.(js|css)?$
- {
- expires 12h;
- access_log off;
- }
- access_log off;
- }
复制代码
|
|