DirectAdmin Nginx Unit for Python Applications

hosseinfani

New member
Joined
Oct 3, 2022
Messages
3
I have an issue setting up a simple python webapplicaiton on a DirectAdmin portal using nginx unit.

At this link I explained the issue with pictures: https://github.com/nginx/unit/issues/766

Basically, there is an error message when I create a route for the webapplication. Also, there is no template for python route.

Any help is much appreciated!
 
Hello

Could you check the output of:
Bash:
curl --unix-socket /var/run/unit/control.sock t/

If it appears empty, then running this might help.
Bash:
echo "action=rewrite&value=nginx_unit" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq
 
Hi Karolis,
The problem is that I'm a user at a school. I don't have the privilege to ssh to the server. I only have access to the DirectAdmin portal. Is it possible to run shell commands in DirectAdmin portal?
 
I would suggest contacting the server admin to check the issue. Running those commands will require root privileges.
 
Hi Karolis,
Here is the result of curl:

root@myweb:~# curl --unix-socket /var/run/unit/control.sock t/
{
"config": {
"listeners": {},
"applications": {

"url_myapp": {
"callable": "application",
"environment": {
"APPGEN": "16XXXX1848"
},

"group": "myuser",
"home": "/home/myuser/domains/url/public_html/myapp/",
"limits": {
"requests": 1000,
"timeout": 300
},

"module": "app",
"path": [
"/home/myuser/domains/url/public_html/myapp/"
],

"processes": {
"spare": 0
},

"type": "python",
"user": "myuser"
}
}
}
}
 
You can run shell commands inside DA, if Propack is installed, and the package and your account have the settings for this. Then you get a nice GUI shell inside DA. Jail is recommended for those settings.
 
Back
Top