System: Ubuntu 14.04 x64
1. docker-compose.yml configured in Ubuntu14.04 built in local virtual machine can be accessed by forwarding the same port and different ports
2. Use the same configuration file on the server. After docker-compose up -d is started,
Using curl on the Serverhttp://127.0.0.1:80Can access, use curlhttp://Server IP:80, cannot be accessed.
If the port is changed to 81:80http://Server IP:81 is also accessible
Netstat has seen the port, 80 is not occupied.
ports: - "80:80" - "3001:3000"
Can port 3001 be accessed?
Port 80 should be blocked by firewall …
Install nmap on another server
sudo apt-get install nmap
Then execute the following command to see if port 80 is blocked:
sudo nmap -p80 192.168.59.1
192.168.59.1 is the IP of the first server.
If port 80 is blocked, the output status is filtered