Vue Nginx 跨域配置小计
摘要:正式环境中Nginx配置 VUE打包后dist目录配置跨域, 同时设置静态资源缓存 server { listen 80; server_name XXX.top www.XXX.top; sendfile on; #charset koi8-r; access_log /var/log/nginx
阅读全文
posted @
2020-04-23 15:07
1161588342
阅读(818)
推荐(0) 编辑
Nginx OPTIONS过滤配置
摘要:前后端分离开发,POST请求先请求OPTIONS 试探请求响应 if ($request_method = 'OOPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Ori
阅读全文
posted @
2020-03-21 11:00
1161588342
阅读(3901)
推荐(1) 编辑
Nginx 返回文本或者json
摘要:参考地址: https://www.cnblogs.com/freeweb/p/5944894.html
阅读全文
posted @
2019-12-07 11:26
1161588342
阅读(184)
推荐(0) 编辑
Nginx 架构 - 功能设计
摘要:了解需求 1 :静态资源 对磁盘 有要求,目录分类要定好 2:代理服务 对CPU,内存有要求. 3 : 动静分离 4: 配置事项
阅读全文
posted @
2019-07-24 16:20
1161588342
阅读(106)
推荐(0) 编辑
Nginx 架构 性能优化 - CPU亲和配置 和 通用配置
摘要:Nginx.conf work_process配置 CPU 亲和绑定 减少进程的切换,减少性能损耗. worker_cpu_affinity 字符串16表示平均分配 查看work process 慕课老师配置 user nginx;worker_processes 16;#worker_cpu_af
阅读全文
posted @
2019-07-24 15:59
1161588342
阅读(516)
推荐(0) 编辑
Nginx 架构 性能优化 - 文件句柄
摘要:大概如下 1:文件句柄 可以理解为文件的索引 2: 设置方式 系统修改 /etc/security/limits.conf 正常情况1W的数量就很大了, root 表示用户, soft 表示应用,可修改为 Nginx针对进程的句柄数限制,修改.conf文件 worker_rlimit_nofile
阅读全文
posted @
2019-07-24 15:36
1161588342
阅读(866)
推荐(0) 编辑
Nginx 架构 - 常见问题
摘要:1 虚拟主机优先级 ls 查看的文件,先读取的配置 作为 2 location匹配优先级 https://www.cnblogs.com/eason-d/p/7657705.html 3: try files 使用 首先判断 $uri 文件是否存在, 若不存在给$uri/加个/ 用于缓存的场景, 动
阅读全文
posted @
2019-07-23 12:26
1161588342
阅读(74)
推荐(0) 编辑
Nginx 阿里云ssl证书下载
摘要:配置地址: https://help.aliyun.com/knowledge_detail/95491.html
阅读全文
posted @
2019-07-23 09:38
1161588342
阅读(384)
推荐(0) 编辑
Nginx 深入 - Lua
摘要:场景: 可以实现项目灰度的发布, 提高高并发效率
阅读全文
posted @
2019-07-22 18:51
1161588342
阅读(76)
推荐(0) 编辑
Nginx 深入 - https的优化
摘要:1: 激活keepalive 长链接 2: 设置SSL Session缓存
阅读全文
posted @
2019-07-22 18:46
1161588342
阅读(188)
推荐(0) 编辑
Nginx 深入-https 苹果要求,去掉重启Nginx 的ssl密码
摘要:更新openssl update_ssl.sh 生成指令 重启去掉密码
阅读全文
posted @
2019-07-22 18:37
1161588342
阅读(462)
推荐(0) 编辑
Nginx 深入-https 原理和实践
摘要:场景: 传输数据安全 缺点: 若被中间人 同时模拟客户端 和服务器 则无法防止 这个缺点需要CA签名证书 http://www.ruanyifeng.com/blog/2011/08/what_is_a_digital_signature.html https://blog.csdn.net/wan
阅读全文
posted @
2019-07-22 18:15
1161588342
阅读(199)
推荐(0) 编辑
Nginx 深入- geoip_module 地域
摘要:场景: 国内访问国内IP, 国外访问国外IP MaxMind GeoIp 二进制读取地域信息 1 国内外做http访问规则 2 国内城市地域做http访问规则 修改nginx.conf 测试.conf
阅读全文
posted @
2019-07-22 15:54
1161588342
阅读(167)
推荐(0) 编辑
Nginx 深入- secure_link_module 模块
摘要:参考链接 https://blog.csdn.net/u012525096/article/details/83578321 1: 资源下载 有效期 2: md5.sh 若执行报错, -bash: xxx: /bin/sh^M: bad interpreter: No such file or di
阅读全文
posted @
2019-07-22 15:17
1161588342
阅读(634)
推荐(0) 编辑
Nginx dos2unix 安装
摘要:https://www.cnblogs.com/qmfsun/p/6549799.html
阅读全文
posted @
2019-07-22 14:52
1161588342
阅读(189)
推荐(0) 编辑
Nginx 深入-rewrite
摘要:场景优点: URL访问跳转, 兼容支持, SEO优化, 后台维护,流量转发, 安全 语法: Syntax: rewrite regex (正则表达式) replacement [flag]; Context: server,location, if 比如维护界面 rewrite ^(.*)$ /pa
阅读全文
posted @
2019-07-21 20:24
1161588342
阅读(94)
推荐(0) 编辑
Nginx 深入-动静分离, 静态资源css, js 前端请求404问题
摘要:优点:减少服务器请求延时 错误的配置, 由于location 匹配到js,css,png,并没有用上 location / {} 的 root配置. 正确的配置,
阅读全文
posted @
2019-07-21 20:09
1161588342
阅读(746)
推荐(0) 编辑
Nginx 场景应用
摘要:1: 静态资源Web服务器 静态资源4类 1> html css js 2>jpeg png gif 3>FLV mp4 4> txt,任何文件类型 文件读取 sendfile on; 默认是关闭的 tcp_nopush on; 默认是关闭的 提升tcp包的传输速度(在sendfile开启的时候使用
阅读全文
posted @
2019-07-18 09:39
1161588342
阅读(118)
推荐(0) 编辑
Nginx valid_referer 防盗链
摘要:https://www.cnblogs.com/wajika/p/6575656.html
阅读全文
posted @
2019-07-17 17:24
1161588342
阅读(443)
推荐(0) 编辑