gilyes / docker-nginx-letsencrypt-sample

Dockerized Nginx + Let's Encrypt sample
https://gilyes.com/docker-nginx-letsencrypt
385 stars 185 forks source link

update nginx config #6

Closed rocklyve closed 7 years ago

rocklyve commented 7 years ago

Hey, I would like to modify the volumes/proxy/templates/nginx.tmpl. So I changed the file and saved it. Now to my question:

This now is not working. How am I able to update the nginx config? Thanks :)

gilyes commented 7 years ago

If your nginx container is already running with the old generated config and you want to change the nginx.tmpl file then you need to restart at least the nginx-gen container for the changes to take effect: docker stop nginx-gen (or stop all with docker-compose stop) and then you can restart with docker-compose up -d

If you are just modifying the services in docker-compose.yml then there should be no need to stop the containers.

You can check the generated config with: docker exec nginx cat /etc/nginx/conf.d/default.conf