RSPAMD Webinterface not available anymore

Discussion in 'Installation/Configuration' started by degoya, May 5, 2023.

Tags:
  1. degoya

    degoya New Member

    I've got running a ISPC multiserver setup with the latest Version with a Mailserver running rspamd.
    Installed with the Tutorial. Everything was running well for a long time.
    now i reconized that the webinterface is not available anymore and the page responds with a "502 - Bad Gateway Error".
    I've doublechecked the Nginx config but the Proxy Setup looks correct so i SSHed to the Mailserver and curled localhost:11334.
    I get HTML-Response from the Webinterface, so the interface itself seems to run. But when i try to curl the external mailserver ip on Port:11334 i get "Connection refused". i've checked the Firewall on the Mailserver and disabled it but still the same result.
    Has something changed with the last updates that i'm not aware of? any config i need to update? Didn't checked the RSPAMD Interface on the last updates, so i'm not sure when it exactly happend.







    .
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you share the config you have set up in the nginx directives?
     
  3. degoya

    degoya New Member

    sure here:

    location / {
    root /usr/share/rspamd/www/;
    try_files $uri @proxy;
    }

    location @proxy {
    proxy_pass http://XXX.XXX.XXX.XXX:11334;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    }

    this has been working like this all the time before. i wonder that i can't reach the web interface from outside.
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Weird. Hard to say...
     
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    The default is "proxy_pass http://127.0.0.1:11334;" since it can only be accessed via localhost, so other IP won't be correct either, if that is what you used and tried to hide. You can also try "localhost" itself instead of its IP in the proxy pass.
     
  6. degoya

    degoya New Member

    i'm on a multiserver setup and the mailserver runs on another machine than the webserver, so i'm not able to use the local IP. Is there a way to allow other IPs in the config?
    the stange thing is that it worked for a long time this way.
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

  8. degoya

    degoya New Member

    i still don't understand how to use this in the multiserver setup. can you tell me please how to use this exactly?
    i got the rspamd webui running on the mailserver and another nginx server is used as proxy. how can i use localhost when i'm on a remote server?
     
  9. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    The idea is to use the same server for proxy since the mail server also has web service as well, otherwise how do rspamd webui run on its port without web service.

    However I guess it is possible to proxy from remote web server but you have to look deeper into it like adding secure_ip etc.

    That page says:
     
  10. degoya

    degoya New Member

    i found the solution to fix that problem. i had to add the secure_ip to the controller worker.

    for other ppl maybe facing the same problem:

    open /etc/rspamd/rspamd.conf

    change the worker "controller" to

    Code:
    worker "controller" {
        bind_socket = "*:11334";
        secure_ip = x.x.x.x
        .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"
    }
    replace the x.x.x.x with your proxy websever ip
     
    ahrasis likes this.

Share This Page