wodby / docker4drupal

Docker-based Drupal stack
https://wodby.com/docker4drupal
MIT License
1.24k stars 535 forks source link

nginx reaload configuration permissions #539

Closed igorbiki closed 1 year ago

igorbiki commented 1 year ago

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.

csandanov commented 1 year ago

run sudo nginx -s reload

igorbiki commented 1 year ago

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