You are not logged in.
Hello everybody, this is my first time using Arch as a web developer. I started by docker containers and i'm able to see them when I run
docker pse123a2cee7dc bla-php "docker-php-entrypoi…" 7 minutes ago Up 7 minutes 9000/tcp bla_php
and added this line in
/etc/hosts127.0.0.1 bla.local
When I curl bla.local I get the following result:
curl: (7) Failed to connect to bla.local port 80 after 1 ms: Couldn't connect to server
What could i have missed?
Last edited by canciser (2024-05-13 09:05:21)
Offline
Make sure to curl to the correct port, which is 9000 in your case?
Offline
Make sure to curl to the correct port, which is 9000 in your case?
curl: (7) Failed to connect to bla.local port 9000 after 2 ms: Couldn't connect to server
Last edited by canciser (2024-05-13 09:05:06)
Offline
You can check which ports are being listened on using these commands
docker port bla_php
sudo ss -tunlp
Considering your container has php in the name, and is using port 9000; I would assume you are running a php server (e.g. php-fpm), not a http server (e.g. nginx). It would be helpfull to have the docker container creation command or compose file to know what is actually happening.
Last edited by AaAaAAaaAAaARCH (2024-05-13 09:32:53)
Offline
* Are you using bridge network mode?
* Did you docker run... with -p 9000:9000?
* Good formatted problem description will cause good and quick solution ![]()
* Please don't forget to mark as [SOLVED].
Offline