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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值