nginx配置https(可支援thinkphp的pathinfo模式)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
開啟檔案: /usr/local/nginx/conf/nginx.conf 把下面兩個類似檔案放到/usr/local/nginx/conf/資料夾中 1_www.baidu.com_bundle.crt; 2_ server { listen 443;
server_name www.baidu.com; #填寫繫結證照的域名
ssl on;
ssl_certificate 1_www.baidu.com_bundle.crt;
ssl_certificate_key 2_www.baidu.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照這個協議配置
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照這個套件配置
ssl_prefer_server_ciphers on;
index index.html index.htm index.php default .html default .htm default .php;
root /home/wwwroot/123/;
# include none.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*.php$ { deny all; }
include enable-php- pathinfo .conf;
location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /.
{
deny all;
}
access_log /home/wwwlogs/beiwang.log;
}
|
thinkphp 的配置中設定:
1
2
3
4
5
|
<?php return array (
//`配置項`=>`配置值`
`URL_MODEL` => 2,
);
|
本文轉自 IT阿飛 51CTO部落格,原文連結:http://blog.51cto.com/itafei/1975658
相關文章
- nginx+thinkphp下解決不支援pathinfo模式NginxPHP模式
- 配置nginx支援pathinfo功能Nginx
- nginx使用ssl模組配置HTTPS支援NginxHTTP
- thinkphp nginx 配置PHPNginx
- ThinkPHP 的 nginx 配置踩坑PHPNginx
- Nginx配置正向代理支援HTTP和HTTPS轉發NginxHTTP
- Nginx配置HTTPSNginxHTTP
- nginx thinkphp rewrite配置項NginxPHP
- Nginx配置域名同時支援 https 和 http 訪問NginxHTTP
- 二、Nginx 配置 httpsNginxHTTP
- Nginx 支援websocket的配置NginxWeb
- Nginx 配置https證書NginxHTTP
- Nginx配置Https專案NginxHTTP
- nginx配置 laravel 支援NginxLaravel
- NGINX配置SSL支援Nginx
- Nginx配置支援phpNginxPHP
- 配置nginx對php的支援NginxPHP
- Nginx使用SSL模組配置httpsNginxHTTP
- nginx docker容器配置https(ssl)NginxDockerHTTP
- nginx+php-fpm配置HTTPSNginxPHPHTTP
- Nginx如何配置HTTPS詳解NginxHTTP
- Nginx的SSL配置優化 – HTTPS SSL 教程Nginx優化HTTP
- nginx的https和http共存反向代理配置NginxHTTP
- nginx 專案配置 https 訪問NginxHTTP
- Nginx配置網站預設httpsNginx網站HTTP
- Nginx如何配置Http、Https、WS、WSS?NginxHTTP
- centos nginx下配置免費httpsCentOSNginxHTTP
- nginx配置https協議訪問NginxHTTP協議
- nginx配置https詳細過程NginxHTTP
- 全站HTTPS升級系列(三)nginx配置全站HTTPSHTTPNginx
- 阿里雲的nginx的https配置問題阿里NginxHTTP
- Debian6.04nginx+mysql+php5-fpmfastcgi+pathinfoNginxMySqlPHPAST
- 介紹Nginx配置支援PHPNginxPHP
- tomcat支援https的server.xml配置TomcatHTTPServerXML
- ThinkPHP學習(一) Windows下Nginx+PHP5+ThinkPHP_3.2.1的安裝與配置PHPWindowsNginx
- nginx配置vue history模式NginxVue模式
- Nginx配置VUE專案Https訪問NginxVueHTTP
- 如何用nginx配置https加密訪問?NginxHTTP加密