全站https实现某个页面可以http访问,其余全部跳转到https,注意下面的location,如果不加root 配置   找不到这个文件的
server {
listen ;
server_name www.test.com;
if ($request_uri !~* "/test-site-verification.txt") {
rewrite ^(.*)$ https://$host$1 permanent;
}
location = /test-site-verification.txt {
root /data/www/test;
}
access_log /data/logs/www/test_www_server-.log;
}

nginx实现某个页面http访问,其余全部跳转到https的更多相关文章

  1. Tomcat配置https及访问http自动跳转至https

    https介绍:   HTTPS(全称:Hypertext Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP的安全 ...

  2. 利用Nginx限制静态页面的访问权限(防盗链、禁止爬虫)

    1.限制爬虫配置 if ($http_user_agent ~* "spider|crapy|Sogou web spider|Baiduspider|Googlebot|Bingbot|3 ...

  3. nginx访问http自动跳转到https

    if ($server_port != '443' ) { rewrite ^/(.*)$ https://cms-news.artron.net/$1 permanent; }

  4. https----------如何在phpstudy环境下配置apache的https访问以及访问http自动跳转成https

    1.首先在 httpd.conf里面修改几个地方 找到 #LoadModule ssl_module modules/mod_ssl.so 去掉前面的# Include conf/vhosts.con ...

  5. Tomcat配置https、访问http自动跳转至https

    1.配置Tomcat,打开$CATALINA_HOME/conf/server.xml,修改如下 <Connector port="8080" protocol=" ...

  6. Nginx配置实例-反向代理实例:根据访问的路径跳转到不同端口的服务中

    场景 Ubuntu Server 16.04 LTS上怎样安装下载安装Nginx并启动: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/detai ...

  7. Nginx的https配置记录以及http强制跳转到https的方法梳理

    一.Nginx安装(略)安装的时候需要注意加上 --with-http_ssl_module,因为http_ssl_module不属于Nginx的基本模块.Nginx安装方法: 1 2 # ./con ...

  8. (转)Nginx的https配置记录以及http强制跳转到https的方法梳理

    Nginx的https配置记录以及http强制跳转到https的方法梳理 原文:http://www.cnblogs.com/kevingrace/p/6187072.html 一.Nginx安装(略 ...

  9. IIS7如何实现访问HTTP跳转到HTTPS访问

    感谢原文作者,为方便后期查阅转载,原文链接:https://www.cnblogs.com/xiefengdaxia123/p/8542737.html 通常情况下我们是用的都是http的路径,对于h ...

随机推荐

  1. poj2181 jumping cow

    umping Cows Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7579   Accepted: 4559 Descr ...

  2. 如何让IE7,IE8支持css3

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 原理:在用ie浏览 ...

  3. HDU 6237.A Simple Stone Game-欧拉函数找素因子 (2017中国大学生程序设计竞赛-哈尔滨站-重现赛)

    A Simple Stone Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Ot ...

  4. (1)powershell使用帮助

    一.更新下载帮助 初始powershell是没有文档的,需要用指令更新下载到本地 管理员运行 update-help 好像有的模块需要FQ才能下载 ?? 帮助文档的开源地址  github.com/p ...

  5. (28)C#委托,匿名函数,lambda表达式,事件

    一.委托 委托是一种用于封装命名和匿名方法的引用类型. 把方法当参数,传给另一个方法(这么说好理解,但实际上方法不能当参数,传入的是委托类型),委托是一种引用类型,委托里包含很多方法的引用 创建的方法 ...

  6. 干净卸载mysql

    一.在控制面板中卸载mysql软件 二.卸载过后删除C:\Program Files (x86)\MySQL该目录下剩余了所有文件,把mysql文件夹也删了 三.windows+R运行“regedit ...

  7. Codeforces Round #325 (Div. 2) Phillip and Trains dp

    原题连接:http://codeforces.com/contest/586/problem/D 题意: 就大家都玩过地铁奔跑这个游戏(我没玩过),然后给你个当前的地铁的状况,让你判断人是否能够出去. ...

  8. [ZJb417]区间众数

    题目大意: 给定一个长度为$n(1\leq n\leq10^5)$的正整数序列$s(1\leq s_i\leq n)$,对于$m(1\leq m\leq10^)$次询问$l,r$,每次求区间$[s_l ...

  9. ife2015-task2-1-2-3

    task2-1.html <!DOCTYPE html><html><head lang="en"> <meta charset=&quo ...

  10. cocurrent包semaphore信号量

    semaphore英[ˈseməfɔ:(r)]美[ˈsɛməˌfɔr, -ˌfor]n. 臂板信号系统,(铁道)臂板信号装置; Semaphore 用法 信号量主要有两种用途: 保护一个重要(代码)部 ...