1.先确保nginx所有的端口进程全部关闭(我的问题最后就是发现我是在nginx进程开启的情况下配置了systemctl,用systemctl reload nginx 报的错)
2.确定nginx的目录(我的是在/usr/local/nginx)以及配置文件的位置(/usr/local/nginx/nginx.conf)
3.参考下面的文章
https://www.cnblogs.com/ansibee/p/8087476.html
https://blog.csdn.net/qq_17054659/article/details/77186249