大网数据广告活动
服务器运维问答

Connection refused after apache update

· 52CE 我爱测

After I updated my apache , none of my virtual hosts are accessible anymore, the server responds "Connection refused". No errors are in the logs and I have no idea what is causing this. My virtual host is something like this: <Vi…

问题原文

原帖链接 · Lucas Pelegrino · CC BY-SA 3.0

After I updated my apache, none of my virtual hosts are accessible anymore, the server responds "Connection refused". No errors are in the logs and I have no idea what is causing this. My virtual host is something like this:

 <VirtualHost 173.XXX.XXX.XXX:80>
      ....
      ServerName hostname.com
      ....
 </VirtualHost>
 <VirtualHost 173.XXX.XXX.XXX:443>
      ....
      ServerName hostname.com
      ....
 </VirtualHost>

Any ideas of how to debug?

已采纳解答

原帖链接 · minniux · CC BY-SA 3.0

"Connection refused" would mean that apache is not listening on port 80; run this command to make sure" lsof -i:80, if you found no output then start apache and try again

Update: after seeing some output of different commands; it turned out that libapache2-mod-php5 is not installed according to dpkg -l | grep apache2 it was flagged as 'rc' (removed, but configuration files remaining). Since the debug information was showing loading mod_php5 then the absence of this package is what causing apache not to start

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-03-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。