linuxserver / docker-nginx

GNU General Public License v3.0
145 stars 44 forks source link

symlink new config path to make "nginx -s/-t" work again. #65

Closed vecjh closed 4 years ago

vecjh commented 4 years ago

hi, nginx in this container is run with non-default location of the config, i.e: /usr/sbin/nginx -c /config/nginx/nginx.conf

therefore things like docker exec <your nginx> nginx -t don't work. I suggest to do the following:

cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.back
rm /etc/nginx/nginx.conf
ln -s /config/nginx/nginx.conf /etc/nginx/nginx.conf

This way one would be able to reload nginx engine w/o reloading the whole container.

aptalca commented 4 years ago

you can still do nginx -t/-s if you know what you're doing

we do not support users running manual commands inside the container