1、docker start 026c30070818
启动镜像
2、docker exec -it 026c30070818 /bin/bash
开启终端交互
3、service fcgiwrap start
启动fcgi服务
4、systemctl status nginx
查看nginx状态
利用curl 检查服务是否打开curl 127.0.0.1:80
5、重启nginx,这里通过设置默认配置文件后reload 实现重启netstat -ntplu
命令查看是否启动成功
root@026c30070818:/usr/local/nginx# find / -name nginx.conf
/etc/init/nginx.conf
/etc/nginx/nginx.conf
/usr/local/src/nginx-1.15.9/conf/nginx.conf
/usr/local/nginx/conf/nginx.conf
/usr/share/doc/fcgiwrap/examples/nginx.conf
root@026c30070818:/usr/local/nginx# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
root@026c30070818:/usr/local/nginx# cd sbin/
root@026c30070818:/usr/local/nginx/sbin# ls
nginx
root@026c30070818:/usr/local/nginx/sbin# ./nginx -s reload
root@026c30070818:/usr/local/nginx/sbin# netstat -ntplu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 258/nginx.conf
tcp 0 0 0.0.0.0:443 0.0.0.0:*