nginx多实例目录结构配置
nginx支持多实例启动,只需要创建一套实例运行的环境配置就可以启动该实例
基本目录结构
woker01
|-- conf
| `-- nginx.conf
|-- data
|-- html
| |-- 50x.html
| `-- index.html
|-- logs
启动实例
cd /root/woker01
ores -p `pwd` -c conf/nginx.conf
启动两个实例查看进程,一个实例总是对应一个master进程和worker进程
[root@VM_0_17_centos worker01]# ores -p `pwd` -c conf/nginx.conf
[root@VM_0_17_centos worker01]# ps -aux | grep nginx
root 26203 0.0 0.1 54764 2812 ? Ss 10:41 0:00 nginx: master process ores -p /root/worker02 -c conf/nginx.conf
root 26240 0.0 0.1 57216 2552 ? S 10:41 0:00 nginx: worker process
root 26450 0.0 0.0 54624 1308 ? Ss 10:45 0:00 nginx: master process ores -p /root/worker01 -c conf/nginx.conf
root 26451 0.0 0.1 57080 2172 ? S 10:45 0:00 nginx: worker process
root 26461 0.0 0.0 112648 964 pts/1 S+ 10:45 0:00 grep --color=auto nginx