随笔分类 - Nginx
摘要:根据请求 worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_
阅读全文
摘要:192.168.0.107 -> 127.0.0.1:8080 || 127.0.0.1:8081 轮询(默认),每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器 down 掉,能自动剔除。 worker_processes 1; events { worker_connections
阅读全文
摘要:location 指令说明 location [ = | ~ | ~* | ^~ ] uri { } = :用于不含正则表达式的 uri 前,要求请求字符串与 uri 严格匹配,如果匹配成功,就停止继续向下搜索并立即处理该请求 ~ :用于表示 uri 包含正则表达式,并且区分大小写 !~:用于表示
阅读全文
摘要:指定 uri 转发到指定端口 #user root; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; s
阅读全文
摘要:两个配置项都属于 ngx_http_core_module alias 例子 location /baidu { alias /opt/static; } 访问 /baidu/xxx.html 实际访问的是 /opt/static/xxx.html root 例子 location /baidu {
阅读全文
摘要:websocket + History 路由 user root; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-st
阅读全文
摘要:安装:https://www.cnblogs.com/jhxxb/p/11525624.html conf/nginx.conf 文件中的内容,包含三部分内容 全局块:配置服务器整体运行的配置指令 events 块:影响 Nginx 服务器与用户的网络连接 http 块 http 全局块 serve
阅读全文
摘要:一、安装 https://nginx.org/en/download.html & https://mirrors.huaweicloud.com/nginx/ (三方带插件版)https://openresty.org/cn/download.html (淘宝基于 Nginx 的修改版)https
阅读全文