Rspamd UI - 502 error when IPv6 is enable

Issue #786 new
Pierre-E created an issue

Hi,

When IPv6 is enable, nginx return 502 error when you try to access to Rspamd UI.

In config file of nginx you have(extract of /etc/nginx/sites-enabled/administration):

    location /admin/rspamd/ {
        auth_request .auth;
        proxy_set_header X-Real-IP "";
        proxy_set_header X-Forwarded-For "";
        proxy_pass  http://127.0.0.1:11334/;
        proxy_set_header Host $http_host;
    }

and in rspamd’s config file(extract of /etc/rspamd/rspamd.conf):

worker "controller" {
    bind_socket = "localhost:11334";
    .include "$CONFDIR/worker-controller.inc"
    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
    .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc"
}

When IPv6 is enable, “localhost“ only resolve “::1“, as ”/etc/hosts” file describe :

127.0.0.1   mail
::1     localhost ip6-localhost ip6-loopback
ff02::1     ip6-allnodes
ff02::2     ip6-allrouters

I think the better way to resolve this issue is to replace all “127.0.0.1“ to “localhost“ in nginx config file.

(I use version 2.2.21)

Comments (0)

  1. Log in to comment