随笔分类 - Nginx
摘要:1.下载FancyIndex包:https://codeload.github.com/aperezdc/ngx-fancyindex/zip/master 2.将下载的zip包解压到nginx源码目录 unzip ngx-fancyindex-master.zip 3.编辑安装Nginx yum
阅读全文
摘要:1.安装 EPEL 仓库和 Remi 仓库: sudo yum install epel-release sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm 2.启用 Remi 仓库中的 PHP 8.2: s
阅读全文
摘要:nginx通用配置文件 user nginx; worker_processes auto; worker_cpu_affinity auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; worker_rlimit_nofile
阅读全文
摘要:1.Nginx加载Lua环境 默认情况下Nginx不支持Lua模块, 需要安装LuaJIT解释器, 并且需要重新编译Nginx, 建议使用openrestry 1)环境准备 [root@localhost ~]# yum -y install gcc gcc-c++ make pcre-devel
阅读全文
摘要:1.HTTPS配置语法 Syntax: ssl on | off; Default: ssl off; Context: http, server Syntax: ssl_certificate file; Default: — Context: http, server Syntax: ssl_c
阅读全文
摘要:1.缓存配置语法 1)proxy_cache配置语法 Syntax: proxy_cache zone | off; Default: proxy_cache off; Context: http, server, location 2)缓存路径 Syntax: proxy_cache_path p
阅读全文
摘要:1.反向代理及负载均衡 Nginx实现负载均衡用到了proxy_pass代理模块核心配置,将客户端请求代理转发至一组upstream虚拟服务池。 1)upstream配置语法 Syntax: upstream name { ... } Default: - Context: http #upstre
阅读全文
摘要:1.静态参数配置 1)文件读取高效sendfile Syntax: sendfile on | off; Default: sendfile off; Context: http, server, location, if in location 2)提高网络传输效率nopush Syntax: t
阅读全文
摘要:1.Nginx状态监控 http_stub_status_module记录Nginx客户端基本访问状态信息 location /mystatus { stub_status on; access_log off; } #Nginx_status概述 Active connections:2 //Ng
阅读全文