随笔分类 -  Nginx

摘要:基本配置 注意:下面的nginx版本是1.10,安装是在CentOS 7中通过epel源进行安装的nginx默认配置文件。 # egrep -v "(^$)|(^#)|#" /etc/nginx/nginx.conf user nginx; worker_processes auto; error_ 阅读全文
posted @ 2017-03-24 00:15 ProfiBus 阅读(1061) 评论(0) 推荐(0)
摘要:ngx_http_core_module ngx_http_core_module模块支持名称与Apache服务器变量匹配的嵌入式变量。 首先,这些是表示客户请求头字段的变量,例如$ http_user_agent,$ http_cookie等等。 还有其他变量: 变量含义 $arg_name 请求 阅读全文
posted @ 2017-03-14 23:58 ProfiBus 阅读(1243) 评论(0) 推荐(0)
摘要:正常运行的必备配置 user Syntax: user user [group]; Default: user nobody nobody; Context: main 指定运行worker进程的用户 和组。 pid Syntax: pid file; Default: pid nginx.pid; 阅读全文
posted @ 2017-02-20 01:19 ProfiBus 阅读(441) 评论(0) 推荐(0)
摘要:ngx_http_uwsgi_module ngx_http_uwsgi_module模块允许将请求传递到uwsgi服务器。 示例配置: location / { include uwsgi_params; uwsgi_pass localhost:9000; } uwsgi_bind Syntax 阅读全文
posted @ 2016-12-30 16:54 ProfiBus 阅读(1626) 评论(0) 推荐(0)
摘要:ngx_http_upstream_module ngx_http_upstream_module模块用于定义可由proxy_pass,fastcgi_pass,uwsgi_pass,scgi_pass和memcached_pass指令引用的服务器组。 upstream Syntax: upstre 阅读全文
posted @ 2016-12-30 11:14 ProfiBus 阅读(1201) 评论(0) 推荐(0)
摘要:ngx_http_proxy_module ngx_http_proxy_module模块允许将请求传递到另一个服务器。 proxy_bind Syntax: proxy_bind address [transparent] | off; Default: — Context: http, serv 阅读全文
posted @ 2016-12-29 16:35 ProfiBus 阅读(1223) 评论(0) 推荐(0)
摘要:ngx_http_access_module ngx_http_access_module模块允许限制对某些客户端地址的访问。 访问也可以通过密码,子请求的结果或JWT来限制。 通过地址和密码的同时访问限制由满足指令控制。 allow Syntax: allow address | CIDR | u 阅读全文
posted @ 2016-12-23 17:40 ProfiBus 阅读(704) 评论(0) 推荐(0)
摘要:ngx_http_fastcgi_module ngx_http_fastcgi_module模块允许将请求传递到FastCGI服务器。 fastcgi_bind Syntax: fastcgi_bind address [transparent] | off; Default: — Context 阅读全文
posted @ 2016-12-22 12:20 ProfiBus 阅读(519) 评论(0) 推荐(0)
摘要:Directives aio Syntax: aio on | off | threads[=pool]; Default: aio off; Context: http, server, location This directive appeared in version 0.8.11. 在Fr 阅读全文
posted @ 2016-12-21 10:40 ProfiBus 阅读(507) 评论(0) 推荐(0)
摘要:核心功能 在Nginx配置文件总可以把配置文件的结构如下: main配置段 event { ... } http { ... server { server_name root location /uri/ { ... } } server { ... } } 在Nginx中每个参数都会有自己所在的 阅读全文
posted @ 2016-12-19 16:54 ProfiBus 阅读(480) 评论(0) 推荐(0)
摘要:Nginx 介绍 简介 Nginx(发音同engine x)是一个网页服务器,它能反向代理HTTP, HTTPS, SMTP, POP3, IMAP的协议链接,以及一个负载均衡器和一个HTTP缓存。 起初是供俄国大型的门户网站及搜索引擎Rambler(俄语:Рамблер)使用。此软件BSD-lik 阅读全文
posted @ 2016-12-16 18:17 ProfiBus 阅读(538) 评论(0) 推荐(0)