• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






守护式等待

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

随笔分类 -  08-nginx

1 2 下一页

 
nginx 文件代理服务器
摘要:nginx 文件代理服务器 server { listen 9900; server_name localhost; #access_log /var/log/nginx/host.access.log main; location /root { root /root/; # 文件放置目录/roo 阅读全文
posted @ 2021-08-25 11:47 守护式等待 阅读(178) 评论(0) 推荐(0)
Nginx的rewrite对地址进行重写
摘要:1.语法 rewrite "用来匹配路径的正则" 重写后的路径 [指令]; 2.案例 server { listen 80; server_name api.shunwang.com; proxy_set_header X-Forwarded-Host $host; proxy_set_header 阅读全文
posted @ 2020-07-10 10:46 守护式等待 阅读(3413) 评论(0) 推荐(0)
nginx 性能优化
摘要:1.文件句柄 liunx 一切皆文件,文件句柄就是一个索引 2.设置方式 系统全局性修改 用户局部性修改 进程局部性修改 3.用户的文件句柄限制 cat /etc/security/limits.conf root soft nofile 65535 # root用户 soft 软连接 root h 阅读全文
posted @ 2019-06-12 11:13 守护式等待 阅读(62) 评论(0) 推荐(0)
nginx 常见的问题
摘要:1.server匹配优先级 nginx 读取文件名是按照文件排序优先读取的顺序 对与一样的server 优先使用先读取到的 2.location匹配优先级 = 进行普通字符精确匹配,也就是完全匹配 优先级最高 匹配上就不会在去寻找其他的location ^~ 表示普通字符匹配,使用前缀匹配 优先级最 阅读全文
posted @ 2019-06-11 17:28 守护式等待 阅读(88) 评论(0) 推荐(0)
nginx lua
摘要:1.lua安装 yum install -y lua 阅读全文
posted @ 2019-06-11 15:48 守护式等待 阅读(80) 评论(0) 推荐(0)
nginx geoip_module 地域信息读取
只有注册用户登录后才能阅读该文。
posted @ 2019-06-11 14:19 守护式等待 阅读(268) 评论(0) 推荐(0)
nginx secure_link_module 访问包含
摘要:server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; root /opt/app/code; location / { secu 阅读全文
posted @ 2019-06-11 10:56 守护式等待 阅读(111) 评论(0) 推荐(0)
nginx 重定向 rewrite 规则
只有注册用户登录后才能阅读该文。
posted @ 2019-06-10 15:18 守护式等待 阅读(220) 评论(0) 推荐(0)
nginx 动静分离
摘要:1.nginx动态和静态请求分离 upstream java_api{ server 127.0.0.1:8080; } server { listen 80; server_name localhost; #charset koi8-r; access_log /var/log/nginx/log 阅读全文
posted @ 2019-06-10 14:37 守护式等待 阅读(51) 评论(0) 推荐(0)
nginx 跨域请求访问
摘要:1.nginx跨域请求访问 location ~ .*\.(htm|html)$ { add_header Access-Control-Allow-Origin(请求域名) *(所有域名) https://www.baidu.com(指定站点); # 跨站请求访问设置 add_header Acc 阅读全文
posted @ 2019-06-10 14:17 守护式等待 阅读(111) 评论(0) 推荐(0)
nginx docker 命令: command not found
只有注册用户登录后才能阅读该文。
posted @ 2019-06-03 15:29 守护式等待 阅读(370) 评论(0) 推荐(0)
nginx 缓存服务
摘要:1.nginx 缓存 upstream imooc { server 116.62.103.228:8001; server 116.62.103.228:8002; server 116.62.103.228:8003; } proxy_cache_path /opt/app/cache(存放缓存 阅读全文
posted @ 2019-05-28 16:11 守护式等待 阅读(60) 评论(0) 推荐(0)
nginx 负载均衡
摘要:1.负载均衡 upstream imooc { server 116.62.103.228:8001; server 116.62.103.228:8002; server 116.62.103.228:8003; } server { listen 80; server_name localhos 阅读全文
posted @ 2019-05-28 15:08 守护式等待 阅读(39) 评论(0) 推荐(0)
nginx 其他配置语法
摘要:1.nginx 缓冲区配置 2.跳转重定向 3.头信息 4.超时 location / { proxy_pass http://127.0.0.1:8080;(代理跳转url) proxy_redirect default(重定向,一般默认就可以); proxy_set_header Host $h 阅读全文
posted @ 2019-05-28 14:30 守护式等待 阅读(54) 评论(0) 推荐(0)
nginx 代理服务
摘要:1.nginx反向代理服务 location ~ /test_proxy.html$ { proxy_pass http://127.0.0.1:8080;(代理访问127.0.0.1:8080) } 2.nginx正向代理 resolver 8.8.8.8;(dns解析) location / { 阅读全文
posted @ 2019-05-28 10:58 守护式等待 阅读(94) 评论(0) 推荐(0)
nginx 防盗链
摘要:1.nginx防盗链 location ~ .*\.(jpg|gif|png)$ { gzip on; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/javascript application 阅读全文
posted @ 2019-05-28 10:12 守护式等待 阅读(49) 评论(0) 推荐(0)
nginx 静态资源服务
摘要:1.文件压缩 location ~ .*\.(jpg|gif|png)$ { gzip on(开启); gzip_http_version 1.1(版本); gzip_comp_level 2(压缩比); gzip_types(文件类型) text/plain application/javascr 阅读全文
posted @ 2019-05-28 09:56 守护式等待 阅读(103) 评论(0) 推荐(0)
nginx访问限制
只有注册用户登录后才能阅读该文。
posted @ 2019-05-27 14:25 守护式等待 阅读(180) 评论(0) 推荐(0)
nginx 请求限制
摘要:1.nginx 请求限制 1.连接频率限制 - limit_conn_module 2.请求频率限制 - limit_req_module 连接限制的语法 请求限制的语法 limit_conn_zone(连接限制) $binary_remote_addr zone=conn_zone:1m; lim 阅读全文
posted @ 2019-05-24 16:48 守护式等待 阅读(90) 评论(0) 推荐(0)
nginx 常用的中间件
只有注册用户登录后才能阅读该文。
posted @ 2019-05-24 16:17 守护式等待 阅读(154) 评论(0) 推荐(0)
 

1 2 下一页