服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. nginx
  3. nginx – 在nginx.conf文件中重写为HTTP或HTTPS
Intereting Posts
在Windows Server 2012 R2上构build横向扩展文件服务器时,我看不到磁盘 当设置LTOencryption时,什么可能导致“感觉错误”? 问题与Outlook – 互联网工作 如何通过浏览器访问基于Windows Server 2003的服务器? 如何将testlink中的testdata从一台服务器转移到另一台? 普通用户能够读/ etc / passwd,这是一个安全漏洞吗? 每个用户代理的nginxcaching EC2上的Apache服务器在本地主机上响应,但不是公共IP nginx:未发送客户端证书CA名称 DC定位器服务(Server 2008R2 / 2012) – 触发切换到备用DC的原因 是否存在短程无线路由器,或者都是2dBi? CentOS 7 Asterisk + FreePBX安装: 使用grep / regex获取温度数组 TCP端口耗尽真实吗? 第一次打开一个SSH服务器到互联网,要检查什么

nginx – 在nginx.conf文件中重写为HTTP或HTTPS

在nginx.conf文件中,是否可以根据当前连接是否安全重写为HTTP或HTTPS?

一些我想要做的伪代码。

location ^~ /test_api { if (secured connection) rewrite "/test_api" https://www.somedomain.com/test_api break; else rewrite "/test_api" http://www.somedomain.com/test_api break; } 

谢谢。

  • 重新启动nginx后端而不会丢失请求
  • Opscode厨师nginx从源代码编译报告成功运行,但什么都不做
  • nginx和php-fpm – 不能写PHP错误日志
  • nginx – select性重写一个位置块
  • 我怎样才能让Nginx告诉Firefoxcaching我的内容?

  • Nginx自动域名redirect
  • Nginx不读取符号链接文件?
  • 通过nginx反向代理中的cookie名称删除cookie
  • nginx gzip在php js和css处理器上不起作用
  • 如何在传递给fastcgi后端之前检查是否存在不可读取的文件?

你正在寻找$scheme 。

 rewrite /test_api $scheme://www.example.com/test_api break; 
  • phpMyAdmin重写为nginx
  • Nginx的 – redirect所有url的根(不显示url中的HTML页面?)
  • Nginx:用附加请求修改响应主体
  • nginx的try_filesredirect尾部的斜杠和403禁止
  • Nginx“重写或内部redirect周期,而内部redirect到”/index.html“”
  • nginx spdy支持不起作用
  • Nginx和Nagios通过FastCGI处理程序,403错误
  • 在ubuntu EC2实例上由nginx服务的用户数
  • 通过php / html格式将file upload到nginx服务器
  • 安装php5-fpm,缺lesspool.d目录

  • © 2017 服务器 Gind.cn
  • Topics
  •        
  • Powered by Server
  • Privacy Policy