wodby/docker4drupal

nginx reaload configuration permissions

igorbiki opened this issue · 2 comments

OS type
Linux/macOS

Describe the bug
After brining all containers up, access nginx service
docker-compose exec nginx bash (linux)
mutagen-compose exec nginx bash (mac) as alternative

This fails, and this worked before:
nginx -t
nginx -s reload

"Why would you need that?"
We are using external configuration file where we set CSP, and allow acceess to some xml feeds. Then we use this on nginx service:

`NGINX_SERVER_EXTRA_CONF_FILEPATH: /etc/nginx/locations.conf`

along with mounting this file to

volumes:
      - ./locations.conf:/etc/nginx/locations.conf:cached

I am cetain this has worked with previous versions, where I could just update locations.conf file, and then reload nginx.
if this was done on purpose, some security concern, then I will have to do stop/up nginx container to reload config.

run sudo nginx -s reload

Awesome! I know sudo prompted password on nginx before. This works now! Thanks!