Nginx 创建

Nginx 创建

今天,我们来聊聊 web Server 如何创建并观看页面。

首先,pull nginx 的 Image 下来

Nginx 创建

观看 Image 是否被 pull 下来了

Nginx 创建

建立 Container

Nginx 创建

  • -p : 设定外部连接容器内部的 port 号

观看 Container 内容

Nginx 创建

这时候可以看到有个 ports 8080 是外部的 port 会打 Container 内部的 80 port,所以只要打下列网址就可以看到 nginx 的预设页面了

http://localhost:8080

Nginx 创建

因为我是用虚拟机下去实作的所以会打 IP ,本机直接 localhost 即可。


分享到:


相關文章: