Linux

httpd 死了但 subsys 被鎖定

  • March 18, 2020

我今天在 php.ini 中修改了 max_execution_time,當我重新啟動伺服器時,我收到了這個錯誤:

Stopping httpd:                                            [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

我殺死了 httpd proc : killall httpd,並啟動它很好,但我無法在伺服器上打開任何網站。

服務 httpd 狀態輸出:

httpd dead but subsys locked

我從 /var/lock/subsys/ 中刪除了 httpd 文件

:S 同樣的問題。

請幫忙!

http -S 輸出:

VirtualHost configuration:
188.165.241.194:80     is a NameVirtualHost
        default server default (/etc/httpd/conf.d/zz010_psa_httpd.conf:47)
        port 80 namevhost default (/etc/httpd/conf.d/zz010_psa_httpd.conf:47)
        port 80 namevhost lists (/etc/httpd/conf.d/zz010_psa_httpd.conf:101)
        port 80 namevhost apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:10)
        port 80 namevhost billiard.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:78)
        port 80 namevhost curve.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:115)
        port 80 namevhost games-world.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:152)
        port 80 namevhost gifts.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:189)
        port 80 namevhost horoscopes.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:226)
        port 80 namevhost questions.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:263)
        port 80 namevhost raja.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:300)
        port 80 namevhost roses.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:337)
        port 80 namevhost search.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:374)
        port 80 namevhost social.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:411)
        port 80 namevhost wikileaks.apps-srv.com (/var/www/vhosts/apps-srv.com/conf/httpd.include:448)
        port 80 namevhost amine.apps-srv.com (/var/www/vhosts/amine.apps-srv.com/conf/httpd.include:68)
        port 80 namevhost streamlikehell.co.cc (/var/www/vhosts/streamlikehell.co.cc/conf/httpd.include:10)
        port 80 namevhost pageweb.uni.cc (/var/www/vhosts/pageweb.uni.cc/conf/httpd.include:68)
        port 80 namevhost findati.com (/var/www/vhosts/findati.com/conf/httpd.include:10)
        port 80 namevhost floupie.com (/var/www/vhosts/floupie.com/conf/httpd.include:10)
        port 80 namevhost rl.floupie.com (/var/www/vhosts/floupie.com/conf/httpd.include:64)
        port 80 namevhost srv1.floupie.com (/var/www/vhosts/floupie.com/conf/httpd.include:88)
        port 80 namevhost test.floupie.com (/var/www/vhosts/floupie.com/conf/httpd.include:119)
        port 80 namevhost torrent.floupie.com (/var/www/vhosts/floupie.com/conf/httpd.include:143)
        port 80 namevhost zoudani.apps-srv.com (/var/www/vhosts/zoudani.apps-srv.com/conf/httpd.include:10)
        port 80 namevhost horde.webmail (/etc/httpd/conf.d/zzz_horde_vhost.conf:1)
188.165.241.194:443    is a NameVirtualHost
        default server default-188-165-241-194 (/etc/httpd/conf.d/zz010_psa_httpd.conf:78)
        port 443 namevhost default-188-165-241-194 (/etc/httpd/conf.d/zz010_psa_httpd.conf:78)
        port 443 namevhost lists (/etc/httpd/conf.d/zz010_psa_httpd.conf:121)
        port 443 namevhost amine.apps-srv.com (/var/www/vhosts/amine.apps-srv.com/conf/httpd.include:13)
        port 443 namevhost pageweb.uni.cc (/var/www/vhosts/pageweb.uni.cc/conf/httpd.include:13)
        port 443 namevhost horde.webmail (/etc/httpd/conf.d/zzz_horde_vhost.conf:41)
wildcard NameVirtualHosts and _default_ servers:
_default_:443          ks380062.kimsufi.com (/etc/httpd/conf.d/ssl.conf:81)
Syntax OK

您在 /var/subsys 或 /var/run 或兩者中都有錯誤的鎖定文件。這個問題的一般形式之前已經在 serverfault 上回答過。

執行 httpd -S 並發布輸出。

$$ Tue Mar 15 19:21:34 2011 $$ $$ warn $$Init:您不應該將基於名稱的虛擬主機與 SSL 結合使用!! 此錯誤也可能導致問題。嘗試禁用所有 https(埠 443)配置。使用 /etc/httpd/conf.d/ 中的 chmod 000 更新正在這樣做的配置並重新啟動 httpd (/etc/init.d/httpd restart)

引用自:https://serverfault.com/questions/247748