我正在安装 Ubuntu 20.04 的全新服务器,
我通过运行启动了一个示例 nginx,docker run --rm -p 80:80 nginx
端口 80 似乎在机器上打开,curl但我无法打开 nginx 默认页面:
$ nmap localhost
Starting Nmap 7.80 ( https://nmap.org ) at 2020-11-15 13:06 GMT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000077s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 …Run Code Online (Sandbox Code Playgroud)