+3

Repeatedly "reconnecting" when using ajenti behind nginx secure reverse proxy

Lê Phương vor 9 Jahren aktualisiert von MaysamF vor 8 Jahren 1
Currently I setup ajenti to stay behind a nginx secure reverse proxy. Everything works as expected except when I click "Save" in a website configuration, a "Reconnecting" popup always appears, sometimes the settings isn't even saved.

When ever the "reconnecting" popup appears, this error appears in the console:

GET https://ajenti.domain.com/ajenti:socket/1/?t=1415682037774 net::ERR_CONNECTION_REFUSED

This is my current config:

server {
    listen *:443 ssl;

    ssl_certificate /etc/nginx.custom.d/ssl/ajenti.domain.com.crt;
    ssl_certificate_key /etc/nginx.custom.d/ssl/ajenti.domain.com.key;

    server_name ajenti.domain.com;

    access_log /var/log/nginx/ajentidomaincom.access.log;
    error_log /var/log/nginx/ajentidomaincom.error.log;

    root /srv/localhost;

    index index.html index.htm index.php;

    ssl_protocols        TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers RC4:HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;
    keepalive_timeout    90;
    ssl_session_cache    shared:SSL:10m;
    ssl_session_timeout  10m;

    location ~ / {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_pass https://127.0.0.1:8000;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header HTTPS   $https;
    }
}

Disable SSL in ajenti config file and then access the configuration page without S in httpS !