
nginx
文章平均质量分 82
键盘侠007
好东西一起分享
展开
-
nginx 学习笔记-完整版
第一步下载nginx http://nginx.org/en/download.html 第二步下载完nginx上传到liunx服务器 第三步 安装依赖环境 1 安装gcc环境 yum install gcc-c++ 2 安装PCRE库,用于解析正则表达式 yum install -y pcre pcre-devel 3 zlib压缩和解压缩依赖 yum install -y zlib zlib-devel 4 ssl安全的加密的套接字协议层,用于http安全传输,也就是http.原创 2020-09-11 16:21:25 · 625 阅读 · 0 评论 -
Nginx 跨域配置支持
#允许跨域请求的域,*代表所有 add_header 'Access-Control-Allow-Origin' *; #允许带上cookie请求 add_header 'Access-Control-Allow-Credentials' 'true'; #允许请求的方法,比如 GET/POST/PUT/DELETE add_header 'Access-Control-Allow-Methods' *; #允许请求的header add_header 'Access-Control-Allow-Hea..原创 2020-08-03 12:49:06 · 217 阅读 · 0 评论 -
nginx location 的匹配规则
空格 :默认匹配,普通匹配 location / { root /home; } = :精确匹配 location = /imooc/img/face1.png { root /home; } ~* :匹配正则表达式,不区分大小写 #符合图片的显示 location ~ \.(GIF|jpg|png|jpeg) { root /home; } ~ :匹配正则表达式,区分大小写 #GIF必须大写才能匹配到 location ~ \.(GIF|jpg|png|jpeg) {原创 2020-08-03 11:21:56 · 149 阅读 · 0 评论 -
nginx 使用gzip压缩提升请求效率
原创 2020-08-03 11:18:23 · 264 阅读 · 0 评论 -
nginx 日志切割定时
https://www.cnblogs.com/leechenxiang/p/7110382.html原创 2020-08-01 17:58:56 · 153 阅读 · 0 评论