使用数据卷部署nginx
创建目录
分别创建两个目录用来存放配置文件和网页内容
[root@localhost ~]# mkdir -p /var/www/html
[root@localhost ~]# mkdir -p /config
上传下载好的html文件包
[root@localhost 38345]# cd /var/www/html/
[root@localhost html]# ls
audio css images index.html js vendor
安装nginx
[root@localhost ~]# yum -y install nginx
//将配置文件复制到/config目录下
[root@localhost nginx]# pwd
/etc/nginx
[root@localhost nginx]# ls
conf.d fastcgi.conf.default koi-utf mime.types.default scgi_params uwsgi_params.default
default.d fastcgi_params koi-win nginx.conf scgi_params.default win-utf
fastcgi.conf fastcgi_params.default mime.types nginx.conf.default uwsgi_params
[root@localhost nginx]# cp -r * /config/
[root@localhost nginx]# cd /config/
[root@localhost conf