Setting up synchronisation for Rspamd on nginx

Discussion in 'General' started by Gerritdl, Dec 5, 2024.

  1. Gerritdl

    Gerritdl Member HowtoForge Supporter

    Im configuring a second server following
    ISPConfig Perfect Multiserver setup on Ubuntu 20.04 and Debian 10 - guide, i am on ubuntu 24.04
    but it only shows apache directives to be added to the website, can somebody help with the nginx directives if needed
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    So you have one server with Apache and one with Nginx and want to mirror them? That's not possible, you can only mirror systems of the same type. If you have an Nginx system as non-mirrored slave or as slave node that will be the master of a nginx server pair, then ISPConfig will show you the Nginx directives field when you add a website on it.
     
  3. Gerritdl

    Gerritdl Member HowtoForge Supporter

    No both are nginx I know where the directive fields are, I dont know what the directives are
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

  5. Gerritdl

    Gerritdl Member HowtoForge Supporter

    Check in the document multiserver
    4 Installing the first mailserver
    4.4 Setting up synchronisation for Rspamd
    they discribe the apache config not nginx, can you help with the nginx
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try these:


    Code:
    # Enable access to /rspamd and redirect to /rspamd/
    location = /rspamd {
        return 301 /rspamd/;
    }
    
    # Proxy all requests under /rspamd/ to 127.0.0.1:11334
    location /rspamd/ {
        proxy_pass http://127.0.0.1:11334;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    
    # Add Access-Control-Allow-Origin header for requests
    add_header Access-Control-Allow-Origin "https://mx2.example.com";
     
  7. Gerritdl

    Gerritdl Member HowtoForge Supporter

    Thank You
     
  8. Gerritdl

    Gerritdl Member HowtoForge Supporter

    Also under
    4.4 Setting up synchronisation for Rspam How do I setup similar reverse proxy for the nginx server "a2enmod proxy_balancer proxy_http" being for the Apache server
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Please see post #6. I've posted a rewrite rule for Nginx there.

    You do not have to load or enable Apache modules in Nginx. These commands are not needed on nginx systems.
     

Share This Page