Nginx 核心知识

Coding Alan 4年前 (2019-10-23) 4512次浏览 0个评论 扫描二维码

初识Nginx

Nginx的三大应用场景Nginx 核心知识

  • 静态资源服务
    • 通过本地文件系统提供服务
  • 反向代理服务
    • Nginx 的强大性能
    • 缓存
    • 负载均衡
  • API 服务
    • OpenResty

优点:

  1. 高并发、高性能
  2. 可扩展性好
  3. 高可靠性
  4. 热部署
  5. BSD 许可证

在线配置生成工具

服务器查看

Nginx 的组成

  • Nginx 二进制可执行文件
  • Nginx.conf 配置文件
  • access.log 访问日志
  • error.log 错误日志

编译Nginx

访问http://nginx.org/en/download.html下载稳定版,以.1.16.1为例

Nginx 命令行

命令行演示

日志切割示例

 

常见问题

1、./configure: error: the HTTP rewrite module requires the PCRE library.

./configure: error: the HTTP gzip module requires the zlib library.

2、Too many open files

 

 

喜欢 (1)
[]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址