apache占用cpu过高_apache server at port 80

(66) 2024-08-02 08:01:01

前提:
业务需要必须使用apache。
同服务器还要启用Nginx。

[root@localhost conf]# netstat -anput | grep httpd tcp 0 0 0.0.0.0:888 0.0.0.0:* LISTEN 17373/httpd tcp6 0 0 :::80 :::* LISTEN 1427/httpd 

第一步:

#禁用ipv6 vim /etc/sysctl.d/99-sysctl.conf net.ipv6.conf.all.disable_ipv6 = 1 sysctl -p 

第二步:

[root@localhost conf]# lsof -i:80 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 1427 apache 4u IPv6  0t0 TCP *:http (LISTEN) [root@localhost conf]# kill -9 1427 

第三步:

[root@localhost conf]# netstat -anput | grep httpd tcp 0 0 0.0.0.0:888 0.0.0.0:* LISTEN 18896/httpd [root@localhost conf]# nginx [root@localhost conf]# netstat -anput | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 19491/nginx: master tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 19491/nginx: master 
THE END

发表回复