随笔分类 - Nginx
摘要:1、丢弃代理前缀 代理IP 源请求路径:http://127.0.0.1/mypath/api/getInfoList?page=1&size=10代理后路径:http://127.0.0.1/api/getInfoList?page=1&size=10丢弃了mypath,【ar
阅读全文
摘要:server配置 server { listen 80; server_name localhost; add_header X-Frame-Options SAMEORIGIN; add_header Referer-Policy origin; add_header Content-Securi
阅读全文
摘要:SSI 是 Server Side Include 的首字母缩略词。包含有嵌入式服务器方包含命令的 HTML 文本。在被传送给浏览器之前,服务器会对 SHTML 文档进行完全地读取、分析以及修改。在 Nginx 中,开启 SSI 支持非常简单,通过向 nginx.conf 中添加几行设置命令即可实现
阅读全文
摘要:URL编码 https://www.iamwawa.cn/urldecode.html 空格 %20 或 + :冒号 %3A /斜杠 %2F RFC3986 协议对 URL 的编解码问题做出了详细的建议,指出了哪些字符需要被编码才不会引起 URL 语义的转变,以及对为什么这些字符需要编码做出了相应的
阅读全文
摘要:【Nginx】配置项说明 1、add_header X-Frame-Options 在 server 节点 页面不允许在frame中展示,即在相同域名的页面中嵌套也不允许 add_header X-Frame-Options 'DENY'; 页面可以在相同域名页面的frame中展示,正常情况下我们通
阅读全文
摘要:源码 安装必要的软件 yum -y install gcc cc cl pcre pcre-devel openssl openssl-devel zlib zlib-devel 下载解压源码 cd usr/local/src mkdir nginx cd nginx wget https://ng
阅读全文
摘要:【Nginx】http重定向https https://blog.csdn.net/liucy007/article/details/123070832
阅读全文
摘要:配置示例 ssi on; ssi_silent_errors on; ssi_types text/shtml; server { listen 443 ; #填写绑定证书的域名 server_name www.myTestDoman.com; #加密协议 ssl_protocols TLSv1 T
阅读全文
摘要:cd E:/env/nginx-1.16.0 测试配置文件 nginx -t -c E:/env/nginx-1.16.0/conf/nginx.conf 启动 nginx -c E:/env/nginx-1.16.0/conf/nginx.conf tasklist /fi "imagename
阅读全文
摘要:http { limit_req_zone binary_remote_addr 表示通过 remote_addr 这个标识来做限制,"binary_"的目的是缩写内存占用量,是
阅读全文
摘要:【Nginx】负载配置 upstream gateway { ip_hash; server 192.168.0.100:8765; server 192.168.0.200:8765; } location ~ ^/api { proxy_pass http://gateway; } ip_has
阅读全文
摘要:【Nginx】常用软件代理设置 proxy_pass http://localhost:5601 最后带/标识绝对路径不会带代理地址 consul location ~ ^/ui { auth_basic "Please input username and password!"; #这里是验证时的
阅读全文
摘要:参考链接:https://blog.csdn.net/zhuyu19911016520/article/details/90714429 As a general rule you need the only worker with large number of worker_connection
阅读全文