nginx 站点80跳443配置
server {
listen 80;
server_name www.furhacker.cn;
location /{
# return 301;
rewrite ^(.*)$ https://$host$1 last;
#rewrite ^(.*)$ https://$host$1 permanent;
}
}
server {
listen 443;
server_name www.furhacker.cn;
root html;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
ssl on;
ssl_certificate_key server.key;
ssl_certificate server.pem;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
include rewrite/***.conf;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.php index.html index.htm;
}
nginx 站点80跳443配置的更多相关文章
- nginx 301 302跳转配置总结
首先看简单的代码示例,关于nginx 301 302跳转的. 301跳转设置: server { listen 80; server_name 123.com; rewrite ^/(.*) http ...
- docker上部署nginx容器80端口自动转443端口
拉去nginx镜像 # docker pull nginx 运行nginx容器config用于拷贝nginx配置文件 # docker run --name nginxconfig -d docker ...
- nginx http跳https配置
为了数据传输的安全性以及防止网页被恶意篡改,现在大多数网站都配置了https. 如何保证用户都是通过https进行访问呢? 如果有用到nginx,我们可以配置强制跳转. 在nginx配置中添加: se ...
- Nginx Server 上80,443端口。http,https共存
server{ listen 80; listen 443 ssl; server_name www.iamle.com; index index.html index.htm index.php; ...
- nginx配置之站点服务请求功能配置
站点服务请求功能配置:html/ nginx.conf中的http{}中的server{}: server { listen 85; server_name localhost; #charset k ...
- Nginx跨域及Https配置
一.跨域 1. 什么是跨域? 跨域:指的是浏览器不能执行其他网站的脚本.它是由浏览器的同源策略造成的,是浏览器对javascript施加的安全限制(指一个域下的文档或脚本试图去请求另一个域下的资源,这 ...
- 【干货】linux使用nginx一个80端口部署多个项目(spring boot、vue、nuxt、微信小程序)
本人只有一个阿里云的ip和一个已经解析过的域名,然后想用80端口部署多个项目,比如输入: www.a.com和www.b.com与www.c.com就能访问不同项目,而不用输入不同端口号区分. 1.这 ...
- nginx从http跳转到https
场景 项目前期使用http,后期为了安全方面的考虑,启用了https. 项目架构:前端使用nginx作为多个tomcat实例的反向代理和负载均衡. 实际上只需要在nginx上启用https即可,使客户 ...
- Nginx负载均衡和HTTPS配置及集群搭建
Nginx的高可用(HA)配置 1.高可用配置结构(画图说明) 2.KeepAlived的安装和配置 1.安装 yum install keepalived 2.keepalived.conf配置文件 ...
随机推荐
- IOS 真机调试以及发布应用 1
参考网站:http://my.oschina.net/u/1245365/blog/196263 Certificates, Identifiers &Profiles 简介 Certif ...
- js 判断url的?后参数是否包含某个字符串
function GetQueryString(name){ var reg=eval("/"+name+"/g"); var r = window. ...
- js学习笔记之:键盘应用
为了方便用户操作,可以为用户设置(或者屏蔽)功能键,代替使用频率比较高的操作.本次,将学习一下基本的功能键使用方法.键盘和焦点使用.屏蔽按键等知识点,以及一些相关示例: 1 设置按键功能: 功能键主要 ...
- hibernate的get、load的方法的区别,IllegalArgument异常
关于hibernate中的load,get,以及延迟加载问题 今天在使用hibernate时,发现一异常: could not initialize proxy - no Session 查询资料之后 ...
- 修改本地数据库root权限密码
方法1: 用SET PASSWORD命令 测试成功 首先登录MySQL @1——mysql DOS 窗口中. 格式:mysql> set password for 用户名@localhost = ...
- Gnuradio 实验二
今天根据教程做了实验二 要到了两个新的模块 一个是 FFT SINK, 其作用是按频谱输出信号. 另外一个就是 GUI Notebook ,起作用就是可以将SCOPE SINK 和 FFT SINK ...
- Python里的拷贝=====》很容易错误的
不能直接用 = 复制: import copy a = [1, 2, 3, 4, ['a', 'b']] #原始对象 b = a #赋值,传对象的引用 c = copy.copy(a) #对象拷贝,浅 ...
- 状态机的c语言编程
http://blog.csdn.net/shandongdaya/article/details/7282547 一 有限状态机的实现方式 有限状态机(Finite State Machine或者F ...
- solr拼写检查代码逻辑
自定义的solr搜索系统作为web应用发布到tomcat后,运行过程中其搜索代码逻辑如下: 用户solr搜索应用发送搜索请求URL,solr应用的org.apache.solr.servlet.Sol ...
- 转:MFC之COleVariant
COleVariant 本质上是一个枚举,用同一种类型来表达不同的子类型.如同boost中的variant. 例子 COleVariant var(3.6f); float v = var.fltVa ...