【发布时间】:2021-12-28 01:06:41
【问题描述】:
一开始我是这样设置应用服务器的。
firstapp.json
{
"listeners": {
"*:8008": {
"pass": "applications/first"
}
},
"applications":{
"first":{
"type":"python 3.8",
"module":"firstapp.wsgi",
"home":"/home/ubuntu/anaconda3/envs/firstapp/",
"path":"/var/www/html/firstapp/current"
}
}
}
sudo curl -X PUT -d @/home/ubuntu/firstapp.json --unix-socket /run/control.unit.sock http://localhost/config
那我要添加secondapp设置,
secondapp.json
{
"listeners": {
"*:8009": {
"pass": "applications/second"
}
},
"applications":{
"second":{
"type":"python 3.8",
"module":"secondapp.wsgi",
"home":"/home/ubuntu/anaconda3/envs/secondapp/",
"path":"/var/www/html/secondapp/current"
}
}
}
sudo curl -X PUT -d @/home/ubuntu/secondapp.json --unix-socket /run/control.unit.sock http://localhost/config
可以注册,但是会覆盖第一个设置。
如何将第二个应用添加到设置中???
【问题讨论】:
标签: python http nginx-unit