Closed shahzadthathal closed 3 years ago
Is it possible that you have apache2 service running in background and listening on port 80?
The Apache page is for its locally installed machine. This stack used Nginx.
You specified, in the docker-compose.yml that nginx should export port 90 not 80. And bound it to port 90 not 80.
You should change the port:
nginx:
build: ./nginx
ports:
- "90:80"
Then try:
http://symfony.localhost:90
The port is required since you mapped a different port then 80 and 443 therefor you should specify it.
Also note that port 90 is not a common HTTP port and it is reserved. Therefor I would change this one too. Use ports which are not reserved or better even reserved as alternative ports for HTTP like 8080 and 8008.
Exactly as commented here, Apache is not related to docker-symfony technical stack.
Please be sure your 80 port is free before using our stack or configure another port number as mentioned in the comment just below.
Closing this issue for now but feel free to reopen is you still have any issue.
symfony.conf server { server_name symfony.localhost; root /var/www/html/simple-api/symfony/public;
My project structure:
I also added symfony.localhost in /etc/hosts
docker-compose.yml (in simple-api root folder) I already have local running mysql, apache so I changed the ports.
-symfony --.env
And when I run
sudo docker-compose up
db_1 container hanged on this point.I can access project here: http://localhost/simple-api/symfony/public/
http://symfony.localhost/