Nignix container doesn't start, and pb between phpfpm and nginx
mathieutu opened this issue · 2 comments
Hi,
I'm new to docker, and I would have one nginx docker, and several others, especially php-fpm and node.js.
I want to use your images of nginx and php-fpm for that.
You built both to work together, but the volumes and names are different :
the "php" container have an image with the volume "/data/www" and the "phpfmp" one that nginx is expecting have the volume '/data/nginx/www'.
Even in the your Nginx-docker's readme, you have the both : /data/www (in the nginx conf) and /data/nginx/www in the run command.
Is there an error, or do I have missed anything ?
Should I re build the phpfpm image to use the same volume that nginx or just run the container with other volume arguments ?
I've try some things, but for now, the nginx container never started. No message or error, just started and stopped in the same time.
Thank you for your help,
Matt'
Try to run:
docker logs nginx
and you'll see any errors that the nginx container had.
In my case, I had to create config/logs dir and config/logs/error.log (empty text file) before the nginx container would run. There is a small error in the docker-phpfpm README.md though, that is, the run command should have --name phpfpm
instead of --name php
for the --link command to work in the nginx container's run command. (Or, update the nginx container run command to --link php
.)
Oddly enough, I have both containers running (on Windows Docker no less) yet, nginx refuses to serve any files, and there's nothing in the logs about it, either.
One other confusing thing is, I tried enabling the services via systemd and found these containers to be not systemd-based, so systemctl doesn't exist.
Otherwise, really great work. I was thinking about forking and submitting a PR for the documentation updates (and including my run command for Windows-based Docker hosts.)