I am using docker on Mac pro.
the localhost page keeps returning the below message when i do a docker-compose up -d:
This site can’t be reached localhost refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED
The localhost used to work, but then stopped working. Not sure what I did wrong.
version: '2' services: apache: image: rafaelcgstz/magento2 # build: . ports: - "80:80" # web - "9001:9000" # xdebug # - "35729:35729" # live reload volumes: - cleanMagento-sync:/var/www/html:nocopy - ~/.composer:/var/www/.composer - ~/.npm:/var/www/.npm # - ~/.nvm:/var/www/.nvm environment: XDEBUG_CONFIG: "remote_host=10.254.254.254 remote_connect_back=0" PHP_IDE_CONFIG: "serverName=Docker" depends_on: - db links: - db networks: - cleanMagento-network networks: cleanMagento-network: driver: bridge volumes: cleanMagento-sync: external: true dbdata: driver: local
any ideas on how to debug the issue will be greatly appreciated.
i did some tests and now believe its to do with the apache
i did a
this returned :
PING 127.0.0.1 (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.042 ms
i also checked if anyting else was listing on port:
sudo lsof -i :80 | egrep "PID|LISTEN"
this returned ;
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 860 root 4u IPv6 0xa09c168da64892ef 0t0 TCP *:http (LISTEN) httpd 864 _www 4u IPv6 0xa09c168da64892ef 0t0 TCP *:http (LISTEN)
i then tested my localhost;
telnet localhost 80
Trying ::1... Connected to localhost.
FINALLY i did a apache config test;
this returned the following ERROR;
AH00557: httpd: apr_sockaddr_info_get() failed for jon-MacBook-Pro.local AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message Syntax OK
NOT clear if this is the cause of the problem, if so, how to fix it