
Nginx
文章平均质量分 53
nginx使用笔记
yimtcode
这个作者很懒,什么都没留下…
展开
-
Nginx:负载均衡
Nginx:负载均衡 1.轮询 1.1.普通轮询 # 上游服务器 upstream servers { server 192.168.1.201:3001; server 192.168.1.201:3002; server 192.168.1.201:3003; } server { listen 80; server_name localhost; #access_log /var/log原创 2021-05-14 08:42:09 · 112 阅读 · 0 评论 -
Nginx:性能优化
Nginx:性能优化 1.limit配置 如果想了解更多请查看linux limit 在/etc/security/limits.conf末尾添加如下内容 * soft nofile 65535 * hard nofile 65535 * soft nproc 65535 * soft nproc原创 2021-05-12 11:50:35 · 73 阅读 · 1 评论 -
Nginx:HTTPS
Nginx:HTTPS nginx version: nginx/1.20.0 1.生成SSL证书 1.1.生成key密钥 # 1.切换到nginx配置文件路径下 cd /etc/nginx # 2.创建ssl文件夹 mkdir ssl # 3.生成密钥key openssl genrsa -idea -out secret.key 2048 1.2.生成证书签名请求文件(csr文件) openssl req -new -key secret.key -out secret.csr 1.3.生成证书原创 2021-05-06 13:51:49 · 138 阅读 · 0 评论 -
Nginx: limit_conn不生效
Nginx: limit_conn不生效 1. 环境 真实主机: macos 11.2.3 虚拟机软件: VirtualBox 6.1.18 r142142 (Qt5.6.3) 虚拟操作系统: CentOS8.0 Nginx版本: 1.20.0 default.conf # 添加规则 limit_conn_zone $binary_remote_addr zone=perip:10m; server { listen 80; server_name localh原创 2021-04-23 11:06:41 · 1758 阅读 · 1 评论 -
Nginx 413 Request Entity Too Large
网页上传文件时提示错误状态码413,查看后台没有错误日志。查看Nginx错误日志提示如下内容 2021/03/30 15:58:52 [error] 30#30: *32 client intended to send too large body: 18790901 bytes, client: xxxx, server: xxxx, request: "PUT /ks/note/save/00000000-0000-0000原创 2021-04-02 23:58:47 · 210 阅读 · 0 评论