I am getting an error that my apache container won’t start because another program already has port 80. I am in Linux and when I run as it seems that mysql already is on port 80. So I tried stopping all containers. Btw, my docker-compose starts apache before mariaDb. Same problem. Apache can’t start because someone already has 0.0.0.0:80. What to do? Is it possible that I need to stop mysql from starting in ububtu? How?
First stop the mysql
service mysql stop or systemctl stop mysql
After check netstat -ntlup |grep 80
Or Direct Kill 80 port use this command sudo kill -9 $(sudo lsof -t -i:80)
Then try to start apache
Are you sure it’s MySQL? 80 is not a MySQL port. I guess you have Apache running on your host.
That’s why i told to first First stop mysql
And mysql is Default running on port 3306
Can you try netstat -ntlup |grep 80 command
That’s what I thought. I typed in sudo systemctl stop apache2 again, and now I don’t see it on port 80. I do now see docker-proxy listening on *:8000.
So now I bring up docker-compose -d up and try typing localhost:8000 and I get err_connection_reset. Any ideas?
Which port you want to use to run apache
After Docker-compose up -d check the 8000 port is running or not
or check with docker-compose up
Thanks Ravi. I am thinking the issue is with not including a code igniter container. When I do include one, I am able to get the port 8000 to work in the browser. My plan now is to append the layer with my code onto the code igniter image, instead of apache. Once I get that up and going, I will be able to change things such as the ghost.conf, one at a time.