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!
 

karolis

Super Moderator
Staff member
Joined
Mar 17, 2020
Messages
11
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
 

hosseinfani

New member
Joined
Oct 3, 2022
Messages
3
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?
 

karolis

Super Moderator
Staff member
Joined
Mar 17, 2020
Messages
11
I would suggest contacting the server admin to check the issue. Running those commands will require root privileges.
 

hosseinfani

New member
Joined
Oct 3, 2022
Messages
3
Hi Karolis,
Here is the result of curl:

[email protected]:~# 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"
}
}
}
}
 

johannes

Verified User
Joined
Feb 18, 2007
Messages
533
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.
 
Top