首页 > 编程知识 正文

80端口开通后telnet测试失败,nginx80端口修改

时间:2023-05-03 18:44:23 阅读:160755 作者:3882

nginx常用命令

nginx启动命令:

先进sbin目录,然后 ./nginx启动

[ root @ VM _0_2_ centos conf ] # CD/usr/local/nginx /

[root@VM_0_2_centos nginx]# ls

client _ body _ tempconfastcgi _ temphtmllogsproxy _ tempsbinscgi _ tempuwsgi _ temp

[ root @ VM _0_2_ centos nginx ] # CD sbin

[root@VM_0_2_centos sbin]# ls

nginx

查看版本

[ root @ VM _0_2_ centos sbin ] #./nginx-v

nginx version: nginx/1.12.2

查看是否启动成功

[ root @ VM _0_2_ centos sbin ] # PS-ef|grepnignx

root 2169612607009336015 pts/000336000336000 grep-- color=autonignx

启动失败了。

原因是端口80被占用,nginx启动失败。

检查所有端口,杀死80端口进程

netstat -ntlp杀死80的进程,12874是进程ID

kill -9 12874之后重新启动并成功

[ root @ VM _0_2_ centos sbin ] #./nginx [ root @ VM _0_2_ centos sbin ] # PS-ef|grepnginxroot 2220093366936660 0:00:00 nginx :00 workerprocessroot 2264512607009336044 pts/000336000 grep-- color=auto nginx http://ww.singinging

./nginx -s reload

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。