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配置的更多相关文章

  1. nginx 301 302跳转配置总结

    首先看简单的代码示例,关于nginx 301 302跳转的. 301跳转设置: server { listen 80; server_name 123.com; rewrite ^/(.*) http ...

  2. docker上部署nginx容器80端口自动转443端口

    拉去nginx镜像 # docker pull nginx 运行nginx容器config用于拷贝nginx配置文件 # docker run --name nginxconfig -d docker ...

  3. nginx http跳https配置

    为了数据传输的安全性以及防止网页被恶意篡改,现在大多数网站都配置了https. 如何保证用户都是通过https进行访问呢? 如果有用到nginx,我们可以配置强制跳转. 在nginx配置中添加: se ...

  4. Nginx Server 上80,443端口。http,https共存

    server{ listen 80; listen 443 ssl; server_name www.iamle.com; index index.html index.htm index.php; ...

  5. nginx配置之站点服务请求功能配置

    站点服务请求功能配置:html/ nginx.conf中的http{}中的server{}: server { listen 85; server_name localhost; #charset k ...

  6. Nginx跨域及Https配置

    一.跨域 1. 什么是跨域? 跨域:指的是浏览器不能执行其他网站的脚本.它是由浏览器的同源策略造成的,是浏览器对javascript施加的安全限制(指一个域下的文档或脚本试图去请求另一个域下的资源,这 ...

  7. 【干货】linux使用nginx一个80端口部署多个项目(spring boot、vue、nuxt、微信小程序)

    本人只有一个阿里云的ip和一个已经解析过的域名,然后想用80端口部署多个项目,比如输入: www.a.com和www.b.com与www.c.com就能访问不同项目,而不用输入不同端口号区分. 1.这 ...

  8. nginx从http跳转到https

    场景 项目前期使用http,后期为了安全方面的考虑,启用了https. 项目架构:前端使用nginx作为多个tomcat实例的反向代理和负载均衡. 实际上只需要在nginx上启用https即可,使客户 ...

  9. Nginx负载均衡和HTTPS配置及集群搭建

    Nginx的高可用(HA)配置 1.高可用配置结构(画图说明) 2.KeepAlived的安装和配置 1.安装 yum install keepalived 2.keepalived.conf配置文件 ...

随机推荐

  1. Web Services

    Web Services 1.       Web Services基本规范概述 1.1.   什么是Web Services Web Services是为实现“基于Web无缝集成”的目标而提出的全新 ...

  2. 纯js实现分页

    原理:所有数据已加载好,js通过遍历部分显示,实现分页效果 html代码 <html> <head> <meta charset='utf-8'> <scri ...

  3. putty登录远程数据库Oracle

    ssh username@127.0.0.1 password oracle -su plusql /nolog dbname/dbpassword sql:exit oracle:$exit ssh ...

  4. IOS 笔试

    iOS基础教程之Objective-C:Objective-C笔试题 作者:蓝鸥科技 发布于:2012-12-14 14:38 Friday 分类:iOS中级-OC开发 iOS基础教程之Objecti ...

  5. ExtJS 4 组件详解

    ExtJS 4 的应用界面是由很多小部件组合而成的,这些小部件被称作"组件(Component)",所有组件都是Ext.Component的子类,Ext.Component提供了生 ...

  6. JDBC操作TimesTen

    无论是操作本地的还是远程的TimesTen服务,客户端都需要安装Tiems Client,并配置客户端DSN. 基本信息如下: 1:创建客户端DSN 点击“添加”: 双击“TimesTen Clien ...

  7. 【Maven实战】传递性依赖的问题

    在上一篇文章中我们已经介绍了依赖性,这次我们再来介绍下传递依赖的问题,首先我们还是在上篇文章基础之上进行编写. 1.上篇文章中已经建立了一个user-core的模块,现在首先再建立一个user-log ...

  8. pstree命令

    功能说明:以树状图显示运行的程序. 语法:pstree [-acGhlnpuUV][-H <程序识别码>][<程序识别码>/<用户名称>] 补充说明:pstree指 ...

  9. (转载)PHP mb_substr函数在实际编码中的应用方法

    (转载)http://developer.51cto.com/art/200912/166080.htm 我们在使用PHP语言进行实际编码中时,通常会遇到许多错误的出现,比如在截取字符串时会出现乱码等 ...

  10. COCI2014-2015CONTEST#7——POLICE

    http://www.hsin.hr/coci/archive/2014_2015/contest7_tasks.pdf [题目描述] 有N个书架,每个书架可以容纳M本书.给出了若干本书,每本书有一个 ...