server {
listen 443;      ####HTTPS指定端口
server_name www.web.com;      #####域名或者IP

root /data/wwwroot/laravel/public;           #####项目所在绝对路径,项目入口
index index.php index.html index.htm ;

########################################################
## HTTPS ##
ssl on;

ssl_certificate /usr/local/nginx/cert/214235201250226.pem;
ssl_certificate_key /usr/local/nginx/cert/214235201250226.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
#########################################################

try_files $uri $uri/ @rewrite;

location @rewrite { 
rewrite ^/(.*)$ /index.php?_url=/$1; 
}

location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}

location ~ [^/]\.php(/|$) {
# fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;

####################################################
## HTTPS ##
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
####################################################

include fastcgi.conf;
}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
expires 30d;
# access_log off;
}

location ~ .*\.(js|css)?$ {http://078886.cn/
expires 7d;
access_log off;
}

}

Nginx, HTTPS的配置的更多相关文章

  1. Nginx httpS server配置

    Nginx httpS 配置 配置同时支持http和httpS协议: server { listen ; #backlog:每个网络接口接收数据包的速率比内核处理这些包的速率快时,允许送到队列的数据包 ...

  2. StartCom 申请 SSL 证书及 Nginx HTTPS 支持配置全攻略

    来源:https://www.williamyao.com/index.php/archives/1397/ 前言 最近收到 StartCom 的邮件,数字证书即将过期,想到去年在 StartSSL ...

  3. nginx https ssl 配置

    #设置https 访问server { listen ; server_name www.xxx.com; access_log xxx/xxx/xxx.log combined; index ind ...

  4. nginx https证书配置

    1. Nginx配置 server { listen 443; #指定ssl监听端口 server_name www.example.com; ssl on; #开启ssl支持 ssl_certifi ...

  5. 申请 Let’s Encrypt 泛域名证书 及 Nginx/Apache 证书配置

    什么是 Let’s Encrypt? 部署 HTTPS 网站的时候需要证书,证书由 CA (Certificate Authority )机构签发,大部分传统 CA 机构签发证书是需要收费的,这不利于 ...

  6. nginx https配置

    nginx的https服务配置如下(在server中配置): ssl on; ssl_session_cache shared:SSL:50m; ssl_session_timeout 1d; ssl ...

  7. Nginx环境下配置PHP使用的SSL认证(https)

    最近一段时间发现好多网站都从http协议变成了加密的https协议,比如说百度.吾志等等.https看起来比http高端了好多,而且在不同的浏览器向上还会显示出不同于http的URL展示效果(比如说c ...

  8. nginx https 配置

    1.创建证书并下载(下载完成后有两个文件) *.pem *.key 2.将两个文件放在linux 某个目录下 3.配置nginx的conf配置文件 server{ # https 端口默认不是80,是 ...

  9. nginx https配置后无法访问,可能防火墙在捣鬼

    同事发现nginx配置后https 无法访问,我帮忙解决的时候从以下出发点 1.防火墙未开放443端口 2.配置出错 1 2 3 于是就 netstat -anp 查看防火墙开的端口 发现已经在监听了 ...

随机推荐

  1. HTML5-应用程序缓存(Application Cache)

    一.什么是应用程序缓存? HTML5 引入了应用程序缓存(Application Cache),这意味着 web 应用可进行缓存,并可在没有因特网连接时进行访问. 二.优势 离线浏览 - 用户可在应用 ...

  2. Part 6:静态文件--Django从入门到精通系列教程

    该系列教程系个人原创,并完整发布在个人官网刘江的博客和教程 所有转载本文者,需在顶部显著位置注明原作者及www.liujiangblog.com官网地址. 前面我们编写了一个经过测试的投票应用,现在让 ...

  3. elaticsear no [query] registered for [filtered] 错误

    1.问题描述 执行语句: GET /megacorp/employee/_search { "query" : { "filtered" : { "f ...

  4. Python基础(中)

    前言 print(" _ooOoo_ ") print(" o8888888o ") print(" 88 . 88 ") print(&q ...

  5. if...else 小练习

    # 需求:猜年龄,可以让用户最多猜三次 age = 60 for i in range(3): guess = int(input("Input Age: ")) if guess ...

  6. Docker网络解决方案 - Calico部署记录

    简单来说,实现docker跨主机容器间通信,常用的第三方网络方案是Flannel,Weave,Calico:Flannel会为每个host分配一个subnet,容器从这个subnet中分配ip,这些i ...

  7. php ajax登录注册

    用户登录与退出功能应用在很多地方,而在有些项目中,我们需要使用Ajax方式进行登录,登录成功后只刷新页面局部,从而提升了用户体验度.本文将使用PHP和jQuery来实现登录和退出功能. 准备数据库 本 ...

  8. Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final)-C-Bracket Subsequence

    #include<iostream> #include<stdio.h> #include<string.h> #include<algorithm> ...

  9. 微信扫描 安卓和ios 不会

    wx.ready(function(){ $('#scan').click(function(){ wx.scanQRCode({ needResult: 1, // 默认为0,扫描结果由微信处理,1 ...

  10. A. A Prank

    题意 有数列从小到大排列,都是不同范围1~ 1000,问你最多去掉多少个数字还能复原 由于wrong很多发所以写一下 链接 [http://codeforces.com/contest/1062/pr ...