转发请求到 FastCGI 服务器器,不不⽀支持 php 模块⽅方式
指令:
15.1 fastcgi_pass
设置 fastcgi 服务器器的地址。地址可以指定为域名
或 IP 地址,以及端⼝口
Syntax: fastcgi_pass address;
Default: —
Context: location, if in location
fastcgi_pass localhost:9000;
15.2 fastcgi_index
fastcgi 默认的主⻚页资源
Syntax: fastcgi_index name;
Default: —
Context: http, server, location
15.3 fastcgi_param
设置传递给 fastCGI 服务器器的参数值,可以是⽂文
本,变量量或组合
Syntax: fastcgi_param parameter value
[if_not_empty];
Default: —
Context: http, server, location
15.4 fastcgi_cache_path
-
Syntax: fastcgi_cache_path path
[levels=levels]
[use_temp_path=on|off]
keys_zone=name:size [inactive=time]
[max_size=size]
[manager_files=number]
[manager_sleep=time]
[manager_threshold=time]
[loader_files=number]
[loader_sleep=time]
[loader_threshold=time]
[purger=on|off] [purger_files=number]
[purger_sleep=time]
[purger_threshold=time];
Default: —
Context: http
location ~* \.php$ {
fastcgi_pass 后端fpm服务器器IP:9000
;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /u
sr/share/nginx/html$fastcgi_script_n
ame;
include fastcgi_params;
}
15.5 fastcgi_cache
调⽤用指定的缓存空间来缓存数据
Syntax: fastcgi_cache zone | off;
Default: fastcgi_cache off;
Context: http, server, location
15.6 fastcgi_cache_key
定义⽤用作缓存项的 key 的字符串串
Syntax: fastcgi_cache_key string;
Default: —
Context: http, server, location
fastcgi_cache_key localhost:9000$req
uest_uri;
15.7 fastcgi_cache_methods
为哪些请求⽅方法使⽤用缓存
Syntax: fastcgi_cache_methods GET |
HEAD | POST ...;
Default: fastcgi_cache_methods GET
HEAD;
Context: http, server, location
15.8 fastcgi_cache_min_uses
缓存空间中的缓存项在 inactive 定义的⾮非活动时间
内⾄至少要被访问到此处所指定的次数⽅方可被认作活
动项
Syntax: fastcgi_cache_min_uses
number;
Default: fastcgi_cache_min_uses 1;
Context: http, server, location
15.9 fastcgi_keep_conn
收到后端服务器器响应后, fastcgi 服务器器是否关闭
连接,建议启⽤用⻓长连接
Syntax: fastcgi_keep_conn on | off;
Default: fastcgi_keep_conn off;
Context: http, server, location
15.10 fastcgi_cache_valid
不不同的响应码各⾃自的缓存时⻓长
Syntax: fastcgi_cache_valid [code
...] time;
Default: —
Context: http, server, location
fastcgi_cache_valid 200 302 10m;
fastcgi_cache_valid 404 1m;

最新文章

  1. 使用sklearn进行集成学习——实践
  2. oracle中TO_CHAR与TO_DATE
  3. MVC NPOI Linq导出Excel通用类
  4. WinForm------窗体初始化位置的显示
  5. [转]ionic $state.go passed $stateParams
  6. Linux vi 中移动光标 命令
  7. C# 跨线程操作控件(简洁)
  8. 从零开始学习UNITY3D(GUI篇 群组视图控件)
  9. nodejs 简单安装环境
  10. 位运算 leecode.389. 找不同
  11. Ubuntu解决没有可安装候选软件包
  12. C# RSA加解密与验签,AES加解密,以及与JAVA平台的密文加解密
  13. npm ERR! Unexpected end of JSON input while parsing near...错误
  14. Vue.$nextTick
  15. 06: dorpzone上传下载
  16. UVa 11077 Find the Permutations (计数DP)
  17. 3dmax导出模型使用相对路径读取纹理贴图
  18. ASP.NET Web API 2入门
  19. Tornado @tornado.gen.coroutine 与 yield
  20. 深入理解JS对象和原型链

热门文章

  1. eNSP——OSPF的基础配置
  2. [学习笔记] 在Eclipse中导入项目
  3. Servlet技术之——概述、实现、细节、获取资源、ServletConfig、ServletContext
  4. XML基础知识归纳(通俗易懂)
  5. 顺序表添加与删除元素以及 php实现顺序表实例
  6. golang使用注意事项
  7. TCP三次握手和四次挥手及wireshark抓取
  8. 强类型c语言 类型
  9. 2019版UI学习路线(含大纲+视频+工具+网盘+面试题)
  10. 『Linux』第二节: 安装Linux系统