全球主机交流论坛
标题:
【求帮助】nginx由https改回http主域名仍然自动跳转到https
[打印本页]
作者:
大华影院
时间:
2017-11-17 15:30
标题:
【求帮助】nginx由https改回http主域名仍然自动跳转到https
如题
之前用的https现在改回来了 相关301跳转和443端口配置均删除
但是浏览器输入主域名还是跳到https
但是加上/index.html就正常
配置已经精简到最小配置了
firefox chrome dege ie 都这样
nginx.conf
user apache apache;
worker_processes auto;
#pid logs/nginx.pid;
events {
worker_connections 1024;
use epoll;
multi_accept on;
}
http {
### 日志处理 ###
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log off;
### 业务相关 ###
include mime.types;
default_type text/html;
charset utf-8;
# gzip
#include gzip.conf;
# 缓存相关
#引用waf配置
include waf.conf;
#引用网站配置
include /opt/openresty/nginx/conf/abc.local;
}
复制代码
abc.local
server {
listen 80;
server_name bbs.abc.cn;
root /var/www/abc;
index index.php index.html;
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})") {
set $year $1;
set $month $2;
set $day $3;
}
access_log /opt/openresty/nginx/logs/$year-$month-$day-findbbs-access123.log;
error_log /opt/openresty/nginx/logs/abc-error123.log;
}
复制代码
作者:
darksheen
时间:
2017-11-17 15:34
之前配置了HSTS了吧
作者:
haohaoge
时间:
2017-11-17 15:41
配置了hsts 在浏览器有记录 浏览器会强制使用https
作者:
大华影院
时间:
2017-11-17 15:43
darksheen 发表于 2017-11-17 15:34
之前配置了HSTS了吧
之前用的github现成的配置 我再检查一遍
作者:
大华影院
时间:
2017-11-17 15:49
有相关配置 但是默认是注释掉的 我没有开启也。我查下有什么方法清除一下。谢谢各位了!
# HSTS (HTTP Strict Transport Security)
# This header tells browsers to cache the certificate for a year and to connect exclusively via HTTPS.
#add_header Strict-Transport-Security "max-age=31536000;" always;
# This version tells browsers to treat all subdomains the same as this site and to load exclusively over HTTPS
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains;" always;
# This version tells browsers to treat all subdomains the same as this site and to load exclusively over HTTPS
# Recommend is also to use preload service
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;" always;
复制代码
作者:
大华影院
时间:
2017-11-17 15:54
本帖最后由 大华影院 于 2017-11-17 15:55 编辑
(, 下载次数: 1)
上传
点击文件名下载附件
清除了问题依旧。。。。
作者:
leaveoff
时间:
2017-11-17 15:55
把站删了吧,好好上班。
作者:
冻猫
时间:
2017-11-17 15:57
清浏览器缓存,用隐身窗口打开。
作者:
大华影院
时间:
2017-11-17 16:06
冻猫 发表于 2017-11-17 15:57
清浏览器缓存,用隐身窗口打开。
就是一直隐身窗口,缓存也全部清了。。。
作者:
benjiam
时间:
2017-11-17 16:09
https不挺好, 全站上https的路过
作者:
冻猫
时间:
2017-11-17 16:10
你配置个新站试试会不会跳转,看看DNS那里是不是设置了什么规则。
作者:
asdqwe876
时间:
2017-11-17 16:43
用ie测试,勾选自动删除缓存。chrome会对这类东西自动缓存的
作者:
aumfoo
时间:
2017-11-17 16:44
浏览器。。。
欢迎光临 全球主机交流论坛 (https://loc.1226.eu.org/)
Powered by Discuz! X3.4