概述&安装
Nginx是一个轻量级的高性能Web服务器,提供HTTP代理、反向代理、负载均衡、缓存等功能,它是基于事件的异步IO的迸发模型。
安装1
2
3
4
5
6
7
8
9# ubuntu安装
$ sudo apt-get install nginx
# 编译安装
$ ./configue \
$ --user=nginx
$ --prefix=/etc/nginx
$ ... # 根据自己的需求配置
$ make
$ sudo make install
基本命令
1 | # 启动,重启,停止 |
默认配置文件
1 | # vim /etc/nginx/nginx.conf |
普通配置
1 | # vim /etc/nginx/conf.d/myweb.conf |
负载均衡
1 | # vim /etc/nginx/conf.d/myweb.conf |
参考
https://nginx.rails365.net/
https://www.v2ex.com/t/465840
https://blog.csdn.net/tjcyjd/article/details/50695922
https://www.cnblogs.com/xiaogangqq123/archive/2011/03/02/1969006.html
https://cloud.tencent.com/developer/article/1068674