nginx 从入门到实践开发

安装

windows

下载

mac

https://brew.sh/
安装目录
/usr/local/etc/nginx

CentOS

cd /usr/local/src/

wget http://nginx.org/download/nginx-1.18.0.tar.gz

tar zxvf nginx-1.18.0.tar.gz

./configure --prefix=/usr/local/nginx

命令

Windows版Nginx使用

cd nginx-1.17.2
启动
start nginx
快速关机(类似于强制关机)
./nginx -s stop
关机(推荐)
./nginx -s quit
重新加载
./nginx -s reload
重新打开
./nginx -s reopen
测试配置文件
nginx.exe -t
查看 nginx 进程
tasklist /fi “imagename eq nginx.exe”

配置 Nginx

配置文件

配置主文件
nginx.conf

windows host配置
C:\Windows\System32\drivers\etc

站点单独配置文件
include servers/*.conf;


相关资料

nginx
Nginx 详解(正向代理、反向代理、负载均衡原理)
Nginx 正向代理配置
Nginx开发从入门到精通

作者

Fallen-down

发布于

2020-03-31

更新于

2021-01-26

许可协议

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

评论

You forgot to set the shortname for Disqus. Please set it in _config.yml.
You need to set client_id and slot_id to show this AD unit. Please set it in _config.yml.