全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1772|回复: 12

【求帮助】nginx由https改回http主域名仍然自动跳转到https

[复制链接]
发表于 2017-11-17 15:30:52 | 显示全部楼层 |阅读模式
如题
之前用的https现在改回来了  相关301跳转和443端口配置均删除
但是浏览器输入主域名还是跳到https
但是加上/index.html就正常

配置已经精简到最小配置了
firefox chrome dege ie 都这样

nginx.conf

  1. user apache apache;
  2. worker_processes auto;


  3. #pid        logs/nginx.pid;


  4. events {
  5.     worker_connections  1024;
  6.     use epoll;
  7.     multi_accept on;
  8. }


  9. http {
  10.     ### 日志处理 ###
  11.     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  12.                       '$status $body_bytes_sent "$http_referer" '
  13.                       '"$http_user_agent" "$http_x_forwarded_for"';
  14.     access_log off;

  15.     ### 业务相关 ###
  16.     include       mime.types;
  17.     default_type text/html;
  18.     charset utf-8;


  19.     # gzip
  20.     #include gzip.conf;

  21.     # 缓存相关

  22.     #引用waf配置
  23.     include waf.conf;

  24.     #引用网站配置
  25.     include /opt/openresty/nginx/conf/abc.local;


  26.    

  27. }
复制代码


abc.local

  1. server {
  2.   listen 80;
  3.   server_name bbs.abc.cn;
  4.   root /var/www/abc;
  5.   index index.php index.html;
  6.    if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})") {
  7.             set $year $1;
  8.             set $month $2;
  9.             set $day $3;
  10.     }
  11.     access_log /opt/openresty/nginx/logs/$year-$month-$day-findbbs-access123.log;
  12.     error_log /opt/openresty/nginx/logs/abc-error123.log;
  13. }
复制代码

发表于 2017-11-17 15:55:18 | 显示全部楼层
把站删了吧,好好上班。
发表于 2017-11-17 15:34:08 | 显示全部楼层
之前配置了HSTS了吧
发表于 2017-11-17 15:41:28 | 显示全部楼层
配置了hsts 在浏览器有记录 浏览器会强制使用https
 楼主| 发表于 2017-11-17 15:43:12 | 显示全部楼层
darksheen 发表于 2017-11-17 15:34
之前配置了HSTS了吧


之前用的github现成的配置  我再检查一遍
 楼主| 发表于 2017-11-17 15:49:12 | 显示全部楼层
有相关配置  但是默认是注释掉的 我没有开启也。我查下有什么方法清除一下。谢谢各位了!
  1. # HSTS (HTTP Strict Transport Security)
  2. # This header tells browsers to cache the certificate for a year and to connect exclusively via HTTPS.
  3. #add_header Strict-Transport-Security "max-age=31536000;" always;
  4. # This version tells browsers to treat all subdomains the same as this site and to load exclusively over HTTPS
  5. #add_header Strict-Transport-Security "max-age=31536000; includeSubDomains;" always;
  6. # This version tells browsers to treat all subdomains the same as this site and to load exclusively over HTTPS
  7. # Recommend is also to use preload service
  8. #add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;" always;
复制代码
 楼主| 发表于 2017-11-17 15:54:16 | 显示全部楼层
本帖最后由 大华影院 于 2017-11-17 15:55 编辑


TIM截图20171117155039.png (10.33 KB, 下载次数: 1)

清除了问题依旧。。。。
发表于 2017-11-17 15:57:57 | 显示全部楼层
清浏览器缓存,用隐身窗口打开。
 楼主| 发表于 2017-11-17 16:06:24 | 显示全部楼层
冻猫 发表于 2017-11-17 15:57
清浏览器缓存,用隐身窗口打开。

就是一直隐身窗口,缓存也全部清了。。。
发表于 2017-11-17 16:09:51 | 显示全部楼层
https不挺好, 全站上https的路过
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-3-29 17:48 , Processed in 0.097063 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表