{"id":6627,"date":"2024-08-02T08:01:01","date_gmt":"2024-08-02T00:01:01","guid":{"rendered":""},"modified":"2024-08-02T08:01:01","modified_gmt":"2024-08-02T00:01:01","slug":"apache\u5360\u7528cpu\u8fc7\u9ad8_apache server at port 80","status":"publish","type":"post","link":"https:\/\/mushiming.com\/6627.html","title":{"rendered":"apache\u5360\u7528cpu\u8fc7\u9ad8_apache server at port 80"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

\u524d\u63d0\uff1a
\u4e1a\u52a1\u9700\u8981\u5fc5\u987b\u4f7f\u7528apache\u3002
\u540c\u670d\u52a1\u5668\u8fd8\u8981\u542f\u7528Nginx\u3002<\/p>\n

[root@localhost conf]<\/span># netstat -anput | grep httpd<\/span> tcp 0 0 0.<\/span>0.<\/span>0.<\/span>0:888 0.<\/span>0.<\/span>0.<\/span>0:*<\/span> LISTEN 17373\/<\/span>httpd tcp6 0 0 :::80 :::*<\/span> LISTEN 1427\/<\/span>httpd <\/code><\/pre>\n

\u7b2c\u4e00\u6b65\uff1a<\/p>\n

#\u7981\u7528ipv6<\/span> vim \/<\/span>etc\/<\/span>sysctl.<\/span>d\/<\/span>99-<\/span>sysctl.<\/span>conf net.<\/span>ipv6.<\/span>conf.<\/span>all.<\/span>disable_ipv6 = 1 sysctl -<\/span>p <\/code><\/pre>\n

\u7b2c\u4e8c\u6b65\uff1a<\/p>\n

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

\u7b2c\u4e09\u6b65\uff1a<\/p>\n

[root@localhost conf]<\/span># netstat -anput | grep httpd<\/span> tcp 0 0 0.<\/span>0.<\/span>0.<\/span>0:888 0.<\/span>0.<\/span>0.<\/span>0:*<\/span> LISTEN 18896\/<\/span>httpd [root@localhost conf]<\/span># nginx<\/span> [root@localhost conf]<\/span># netstat -anput | grep nginx<\/span> tcp 0 0 0.<\/span>0.<\/span>0.<\/span>0:80 0.<\/span>0.<\/span>0.<\/span>0:*<\/span> LISTEN 19491\/<\/span>nginx: master tcp 0 0 0.<\/span>0.<\/span>0.<\/span>0:443 0.<\/span>0.<\/span>0.<\/span>0:*<\/span> LISTEN 19491\/<\/span>nginx: master <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"apache\u5360\u7528cpu\u8fc7\u9ad8_apache server at port 80\u524d\u63d0\uff1a\u4e1a\u52a1\u9700\u8981\u5fc5\u987b\u4f7f\u7528apache","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6627"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=6627"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6627\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=6627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=6627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=6627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}