我今天修改了 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
答案1
您的 /var/subsys 或 /var/run 中有一个错误的锁文件,或者两者兼而有之。这个问题的一般形式是之前回答过在服务器故障上。
答案2
运行 httpd -S 并发布输出。
[2011 年 3 月 15 日星期二 19:21:34] [警告] 初始化:您不应将基于名称的虚拟主机与 SSL 结合使用!!
此错误也可能导致此问题。尝试禁用所有 https(端口 443)配置。使用 chmod 000 更新 /etc/httpd/conf.d/ 中的配置,然后重新启动 httpd(/etc/init.d/httpd restart)
答案3
您是否已检查日志以查看发生了什么?我希望在 syslog 和 httpd 中看到一些内容。
您可以在大多数系统上的 /var/log 中找到日志。
另外,您是否查看过是否存在由于挂起进程而导致的现有文件锁?
psgrep httpd
应该向您显示是否存在任何僵尸进程。
答案4
对我来说,解决这个问题的方法是更新 php apc 配置。
对于 apc 3.1.4 及更高版本,您应该使用后缀指定值,即:
apc.shm_size=512M
对于 3.1.4 之前的版本,这种格式似乎会导致 apache 崩溃。apc 版本可以通过 phpinfo(); 查看。解决方案:删除和的“M”后缀apc.shm_size
。apc.max_file_size
然后删除锁定文件并重新启动 httpd。