Redis and Nginx settings using Unix sockets

557 views
Skip to first unread message

quicktrick

unread,
Oct 25, 2017, 9:13:19 AM10/25/17
to rspamd
Hello!  Please help a newbie. I’m trying to setup my home mail server on openSUSE. I’ve got Postfix + Dovecot + Roundcube working already.

I want to configure Redis and Nginx for using with Rspamd via Unix sockets.  In fact, I have Nextcloud working on my server too, and it uses Redis via a Unix socket. Besides, my Nginx makes fastcgi_pass to php handler via a Unix socket too.

So, is it possible to configure Rspamd to use Redis somehow like this:

/etc/rspamd/local.d/redis.conf
servers = "unix:/var/run/redis/redis.sock";

/etc/rspamd/local.d/classifier-bayes.conf
servers = "unix:/var/run/redis/redis.sock";
backend
= "redis";
autolearn
= true;



And may I configure Rspamd for using with Nginx proxy like this:

/etc/rspamd/local.d/worker-controller.inc
bind_socket = "/run/rspamd/worker-controller.socket mode=0666 owner=_rspamd";

/etc/nginx/nginx.conf
location /rspamd/ {
 proxy_pass unix
:/run/php/php7.1-fpm.sock;

 proxy_set_header
Host $host;
 proxy_set_header X
-Real-IP $remote_addr;
 proxy_set_header X
-Forwarded-For "";
}


quicktrick

unread,
Oct 25, 2017, 9:19:09 AM10/25/17
to rspamd
Sorry, there is a typo in the 
 
/etc/nginx/nginx.conf
location /rspamd/ {
 proxy_pass unix
:/run/rspamd/worker-controller.socket;
Reply all
Reply to author
Forward
0 new messages