In the case of postgres 11 on Ubuntu 18.04

/etc/postgresql/11/main/postgresql.conf

For redis

https://stackoverflow.com/a/19091231/2908382