nginx中proxy_pass末尾带斜杠/和不带的区别2023年1月18日 | 网站建设nginx中proxy_pass末尾带斜杠/和不带的区别: 如果proxy_pass末尾有斜杠/,proxy_pass不拼接location的路径,也就是说会把location的部分 去掉后剩下的拼接到proxy_pass u……阅读全文
使用ngx_http_concat合并和压缩资源, 加速网站2023年1月18日 | 网站建设在使用nginx时,要新增ngx_http_concat模块可以采用以下步骤: 首先,在您的系统上安装nginx源码。 下载ngx_http_concat模块的源代码,您可以在这里下载https://github.com/a……阅读全文
网站优化 url地址rewrite处理2023年1月18日 | 网站建设地址修正 网站换了技术类型。需要调整部分url地址。一些url地址做相应的rewrite处理。 nginx中 https://xxx.com/tag/php高手修炼/ 变为https://xxx.com/tags/php高手修炼……阅读全文
nginx开源版本与nginx plus企业版、openresty 、Tengine的版本选择2020年3月26日 | nginx web-servernginx开源版本与nginx plus企业版、openresty 、Tengine他们都是web服务器和负载软件。他们有哪些区别?web服务器怎样选择? nginx特性 Nginx 是一个高性能的 HTTP 和反向代理 web 服务器,同时也提供了 IMAP/POP3/SMTP 服务……阅读全文
nginx: [alert] mmap(MAP_ANON|MAP_SHARED, 536870912) failed (12: Cannot allocate memory)报错【已解决】2020年3月25日 | nginx问题 nginx -t报错 nginx: [alert] mmap(MAP_ANON|MAP_SHARED, 536870912) failed (12: Cannot allocate memory) 解决方案 内存映射无法完成,共享内存无法分配~查看配置文件,找到这一句: proxy_cache_path /usr/local/nginx/proxy_cache_path levels=1:2 keys_zone=cache_one:600m inactive=1d max_size=20g; 这里设置反向代理缓存区名称为 cache_one,内存大小 600M,自动清除超过一天未被访问的缓存数据,硬盘……阅读全文
网站日志分析工具goaccess安装配置实战2020年3月25日 | web-server安装 GeoIP-devel ncurses-devel GeoIP-update yum install glib2 glib2-devel GeoIP-devel ncurses-devel zlib zlib-devel yum install gcc -y rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm yum -y install GeoIP-update 安装goaccess wget https://tar.goaccess.io/goaccess-1.3.tar.gz tar xzvf goaccess-1.3.tar.gz cd goaccess-1.3/ ; ./configure --enable-geoip --enable-utf8 ; make && make install 使用goaccess 修改nginx.conf文件的日志存储格式 log_format main '$remote_addr - $remote_user [$time_local] requesthost:"$http_host"; "$request" requesttime:"$request_time"; ' '$status $body_bytes_sent "$http_referer" - $request_body' '"$http_user_agent" "$http_x_forwarded_for"'; nginx配置 location /report.html { alias /home/zopen/nginx/html/report.html;……阅读全文
nginx location proxy_pass 后面的url 加与不加/的区别2020年3月15日 | nginxlocation 拦截特定的路径时 location /test test后面带/和不带/有什么区别呢 proxy_pass 如果test后不带/ 表示会拦截 如/test /test01 /testxxxxx 这一类请求,只要是以test开头的请求都会被拦截 如果test后带/ 表示只会拦截/test 或者/test/xxxx等……阅读全文
nginx 压缩静态资源实战2020年3月15日 | nginx以下是开启gzip压缩缓存 gzip on; #该指令用于开启或关闭gzip模块(on/off) gzip_buffers 16 8k; #设置系统获取几个单位的缓存用于存储gzip的压缩结果数据流。16 8k代表以8k为单位,安装原始数据大小以8k为单位的16倍申请内存 gzip_comp_level……阅读全文
Nginx问题采坑优化总结 必看2020年2月26日 | nginx显示乱码问题 server { listen 80; server_name fffmo.com; root /var/www/fffmo.com; location / { charset utf-8; #一般是在个别的location中加入此项,具体情况具体对待 rewrite .* /index.html break; } } index显示列表(一般为企业内部使用) 可在在location server 或 http段中加入 autoindex on;//自动显示目录 autoindex_exact_size o……阅读全文
tengine安装部署2019年12月10日 | tengineTengine是什么 Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。Tengine的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检……阅读全文