Closed PikuZheng closed 1 year ago
Since the configuration documentation instructs us to map the configuration folder outside the container:
In config/ you'll find the default configuration files for Nginx, PHP and PHP-FPM. If you want to extend or customize that you can do so by mounting a configuration file in the correct folder;
Nginx configuration:
docker run -v "`pwd`/nginx-server.conf:/etc/nginx/conf.d/server.conf" trafex/php-nginx
Default configuration files lost after upgrade https://github.com/TrafeX/docker-php-nginx/commit/bf2732f0cf25d531578c3d56ac56117ce0031fcb . I think necessary adjustments or clarifications are needed here.
Hi @PikuZheng,
The default config is not lost when you mount it like described in the README because that only mounts a specific file in the conf.d
folder of nginx.
But when you mount the whole conf.d
folder (e.g. docker run -v /my/conf.d:/etc/nginx/conf.d ..
) it indeed will be lost. Is that how you run the container?
Are you able to change that to only the specific files?
My bad. thank you for your reply. Due to the need to map multiple files including ssl certificates and since it changes often, I mapped the entire folder. I was annoyed when I found out that it didn't work after auto-update. I added it to my config file after I found out that only the default configured listening port was not working. All functions are currently working fine.
Since it is automatically upgraded by watchtower, the service stops after the upgrade, and the web page shows that the connection is refused. Log has no valid information. Restarting the container doesn't work. How can I troubleshoot?