ajenti: The following plugin has failed to load - Ajenti 2.1.21 behind NGINX 1.12.1
Hi,
I’m using Ajenti 2.1.21 behind an NGINX 1.12.1 proxy on an Ubuntu 16.04.3 LTS and get the following error
Warning
The following plugin has failed to load: . Please fix or uninstall it.
OK
If I’m opening ajenti directly through http://servername:8000 it works fine.
Here are mir configs /etc/nginx/conf.d/default.conf:
server {
listen 443 ssl;
server_name MYSERVERNAME;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
ssl_certificate /etc/letsencrypt/live/zuhause.dannykorpan.de/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/zuhause.dannykorpan.de/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
location /ajenti {
rewrite (/ajenti)$ / break;
rewrite /ajenti/(.*) /$1 break;
proxy_pass http://127.0.0.1:8000;
proxy_redirect / /ajenti/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Origin http://$host;
}
}
This is my ajenti config file /etc/ajenti/config.yml
auth:
allow_sudo: true
emails: {}
provider: os
bind:
host: 0.0.0.0
mode: tcp
port: 8000
color: default
language: de
max_sessions: 9
name: SERVERNAME
ssl:
certificate: null
client_auth:
certificates: []
enable: false
force: false
enable: false
/var/log/ajenti/ajenti.log
2017-08-14 10:39:09,902 INFO : Loading config from /etc/ajenti/config.yml
2017-08-14 10:39:09,921 INFO : Ajenti Core 2.1.21
2017-08-14 10:39:09,922 INFO : Detected platform: debian / Ubuntu 16.04.3 LTS
2017-08-14 10:39:10,075 INFO : Discovered 12 plugins
2017-08-14 10:39:11,169 INFO : Loaded 12 plugins
2017-08-14 10:39:11,170 INFO : Binding to [0.0.0.0]:8000
2017-08-14 10:39:11,199 INFO : New worker "restricted session" PID 20400, EUID 0, EGID 0
2017-08-14 10:39:11,200 INFO : Worker 20400 is demoting to UID 1000 / GID 1000...
2017-08-14 10:39:11,201 INFO : ...done, new EUID 1000 EGID 1000
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 15
Wow! I fixed it! It’s my nginx config, all working now 😃
Try: https://gist.github.com/flionic/c1082243b58ed42abfe2018f8aeac835
Seems like Ajenti have problems running on a subdirectory but can run perfectly fine on its own. I have posted my config in @flionic 's post a slightly simplier configuration 😄
Thanks @flionic, @Encrypt93. I guess it is worth to keep the reference here also.
Hope, someday this will go to official docs.