nginx部署

 · 2020-2-24 · 次阅读


1、nginx部署-修改配置文件后重启
到更改的配置文件目录下运行nginx -t 得到
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
表示配置文件配置正常
此时运行nginx -s reload 重启nginx

查询nginx主进程号
ps -ef | grep nginx

常见错误
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)