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配置文件 ...
随机推荐
- TalkingData游戏版本在Cocos2d-x 3.0使用
Cocos2dx在3.0的版本中改动确实不少啊,所以导致原来可以在Cocos2.x版本上的demo都不能直接用,所以不得不重要写一个新的demo 但是TalkingData的库一直都是可以用的,只是之 ...
- 『重构--改善既有代码的设计』读书笔记----Inline Method
加入间接层确实是可以带来便利,但过多的间接层有时候会让我自己都觉得有点恐怖,有些时候,语句本身已经够清晰的同时就没必要再嵌一个函数来调用了,这样只会适得其反.比如 void test() { if ( ...
- 你真的了解console吗?
对于前端开发者来说,在开发过程中需要监控某些表达式或变量的值的时候,用 debugger 会显得过于笨重,取而代之则是会将值输出到控制台上方便调试.最常用的语句就是console.log(expres ...
- gulpfile的结构
使用了 yargs 用于获取启动参数,针对不同参数,切换任务执行过程时需要,本项目中的useCache和useSess path 不明,貌似是用来将某个目录中的文件 ...
- Spring <context:annotation-config/>
在基于主机方式配置Spring的配置文件中,你可能会见到<context:annotation-config/>这样一条配置,他的作用是式地向 Spring 容器注册 AutowiredA ...
- 针对上一篇文章中的代码,想出的重构方案(python实现)
#!/usr/bin/env python class Processor: def __init__(self, processor): self.processor = processor def ...
- Mifare 1卡的存储结构
存取控制指符合什么条件才能对卡片进行操作. S50和S70的块分为数据块和控制块,对数据块的操作有“读”.“写”.“加值”.“减值(含传输和存储)”四种,对控制块的操作只有“读”和“写”两种. S50 ...
- 转:Top 10 Algorithms for Coding Interview
The following are top 10 algorithms related concepts in coding interview. I will try to illustrate t ...
- SPSS相关和回归分析
1.语文和数学成绩都受IQ的影响而且相互影响,则分析语文和数学的关系时需要偏相关分析.2.距离分析用于探索相似性,比如给了某年的12个月三个城市的气温数据,然后分析,会得到一个相似性矩阵,这是个对称阵 ...
- ASP.NET MVC 实现与SQLSERVER的依赖缓存
原文:ASP.NET MVC 实现与SQLSERVER的依赖缓存 本文主要是为了了解ASP.NET MVC 实现与SQLSERVER的依赖缓存的功能,针对自己对于这方面知识的学习的过程的一个记录.由于 ...