nginx 反向代理 总结

查看nginx 安装目录

[root@tang closer]# whereis nginx

nginx: /usr/local/nginx

启动nginx

[root@tang conf]# /usr/local/nginx/sbin/nginx

出现端口被占用问题

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

查看哪些进程占用80端口号

[root@tang conf]#  netstat -ltunp

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      32706/nginx: master

杀掉该进程

[root@tang conf]# kill -9 32706


你可能感兴趣的:(nginx 反向代理 总结)