- Create
pleroma/config/blocklist.exs
- Edit
pleroma/config/prod.secret.exs
to includeblocklist.exs
- Move
nginx.ex
intopleroma/lib/mix/tasks/pleroma/
- Restart Pleroma
- Restart Pleroma
- Generate nginx blocklist files:
- Run
MIX_ENV=prod mix pleroma.nginx ip > /tmp/blocklist-ip.conf
- Run
MIX_ENV=prod mix pleroma.nginx ua > /tmp/blocklist-ua.conf
- Run
- Install nginx blocklist files:
- Run
sudo chown root:root /tmp/blocklist-*.conf
- Run
sudo mv /tmp/blocklist-*.conf /etc/nginx/
- Run
- Test config syntax before using it:
sudo nginx -t
- If dependencies have changed since last run, sometimes one of the blocklist files will contain a few info messages from Mix. You'll need to delete these manually.
- Reload nginx config:
sudo nginx -s reload