Skip to main content

docker-compose nginx, container starts but nginx is not running on port 80, no errors

Updated by Tim Rabbetts on
computer, technology, pc

This was a tricky one.  I'm building a tool to spin up new Drupal instances, built on docker, using a distro.  I ran everything and the nginx container was running but using this command I could see nothing running on port 80, and nothing loaded in the browser.

netstat -tulpn
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.11:44351        0.0.0.0:*               LISTEN      -                   
udp        0      0 127.0.0.11:59921        0.0.0.0:*                           -                   

Solved this, there was no conf file in the /etc/nginx/conf.d, you need at least one or nginx will not run.  Added one, and it came back.

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1/nginx: master pro 
tcp        0      0 127.0.0.11:42681        0.0.0.0:*               LISTEN      -                   
udp        0      0 127.0.0.11:58003        0.0.0.0:*                           -    

 

Add new comment