随笔分类 - nginx
摘要:修改文件大小限制 client_max_body_size 200m
阅读全文
摘要:deny模块位置 Syntax: deny address | CIDR | unix: | all; Default: — Context: http, server, location, limit_except vim denyips.conf deny 192.168.1.1; includ
阅读全文
摘要:#添加sticky模块 ./configure --prefix=/data/tengine --with-http_stub_status_module --with-http_ssl_module --add-module=modules/ngx_http_upstream_session_st
阅读全文
摘要:参考链接 https://www.cnblogs.com/progor/p/13338483.html https://www.cnblogs.com/progor/p/13338484.html https://www.cnblogs.com/progor/p/13338485.html
阅读全文
摘要:#参考链接 https://www.cnblogs.com/binghe001/p/13285890.html https://github.com/sunshinelyz/ABTestingGateway
阅读全文
摘要:所述ngx_stream_ssl_module模块(1.9.0)提供了一种用于流代理服务器工作与SSL / TLS协议的必要的支持。 默认情况下未构建此模块,应使用--with-stream_ssl_module 配置参数启用它 。 #配置示例 为了减少处理器负载,建议 将工作进程数设置为 等于处理
阅读全文
摘要:参考链接 https://www.cnblogs.com/itzgr/p/13271580.html
阅读全文
摘要:待完善 参考 https://www.cnblogs.com/duanxz/p/4919154.html https://zhuanlan.zhihu.com/p/154108247
阅读全文
摘要:下面介绍在nginx中实现防盗链配置方法有对图片防盗链与下载资源 防盗链配置 假设网站域名是 www.php100.com。 编辑nginx.conf,在 www.php100.com 区域添加如下内容: location ~* .(gif|png|jpg|bmp|swf|flv)$ { valid
阅读全文
摘要:查看当前编译 nginx -V 增加 --with-http_stub_status_module 监控nginx状态 进入我们之前的解压包路径 ./configure --prefix=/data/nginx --with-stream --with-http_stub_status_module
阅读全文
摘要:#常用命令 nginx -s stop 快速关闭Nginx,可能不保存相关信息,并迅速终止web服务。 nginx -s quit 平稳关闭Nginx,保存相关信息,有安排的结束web服务。 nginx -s reload 因改变了Nginx相关配置,需要重新加载配置而重载。 nginx -s re
阅读全文
摘要:nginx是通过alias设置虚拟目录,在nginx的配置中,alias目录和root目录是有区别的: 1)alias指定的目录是准确的,即location匹配访问的path目录下的文件直接是在alias目录下查找的; 2)root指定的目录是location匹配访问的path目录的上一级目录,这个
阅读全文
摘要:Windows版本因为文件访问句柄数被限制为1024了,当访问量大时就会无法响应 error_log maximum number of descriptors supported by select() is 1024 使用专门的windows版本的nginx,已修改了文件句柄数据的限制。 ngi
阅读全文
摘要:https://www.cnblogs.com/xiaoliangup/p/9175932.html https://mp.weixin.qq.com/s/wzEbWNN8BBLdP3mFW9ieNw
阅读全文
摘要:``` nginx配置upstream跳转失败,网页status code 302 增加proxy_set_header Host $host:$server_port; location / { proxy_pass http://zhcslyg-web; proxy_set_header Host $host:$server_port; } ```
阅读全文
摘要:``` Nginx status显示结果详解 Active connections: 3 表示Nginx正在处理的活动连接数3个 server accepts handled requests 8 8 67 第一个 server 表示Nginx启动到现在共处理了 8 个连接 第二个 accepts 表示Nginx启动到现在共成功创建 8 次握手 第三个 handled requests 表示总共处
阅读全文
摘要:``` cd /lib/systemd/system/ vim nginx.service [Unit] Description=nginx service After=network.target [Service] Type=forking ExecStart=/usr/local/nginx/sbin/nginx ExecReload=/usr/local/nginx/sbin/nginx
阅读全文
摘要:yum install -y git git clone https://github.com/alexazhou/VeryNginx.git cd VeryNginx python install.py install 配置文件位置 /opt/verynginx/openresty/nginx/c
阅读全文
摘要:``` 负载均衡 upstream test_http{ server 172.28.12.31:8001 weight=1; server 172.28.12.33:8002 weight=1; } https-ssl证书 # HTTPS server server { listen 9090 ssl; server_name domain.name; ssl_certificate cert/
阅读全文