我有一个在 Debian 8 (Jessie) 上运行的 Apache Web(版本 2.4.10)服务器。它主要用作SVN存储库服务器。 几周以来它一直运行良好,突然间,我在尝试从 Web 浏览器列出 SVN 存储库时遇到了内部错误,如下所示:
如您所见,身份验证仍然工作正常。
我运行了以下 2 个命令: systemctl 状态 apache2.service 和 日记ctl-xn
但这对我没有多大帮助,也许我错过了什么? 我最近没有修改任何与 Apache 相关的配置文件(甚至其他任何与此相关的文件):既没有修改主 apache conf 文件,也没有修改任何 vHost conf 文件。 我尝试重新启动 Apache,它确实重新启动,但 Web 服务器仍然遇到内部错误。
错误日志:
[Sun Jan 31 18:36:17.372502 2016] [core:notice] [pid 27449:tid 140087289513856] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jan 31 18:37:07.641329 2016] [mpm_event:notice] [pid 27449:tid 140087289513856] AH00491: caught SIGTERM, shutting down
[Sun Jan 31 18:38:31.156131 2016] [wsgi:warn] [pid 1049:tid 140557851056000] mod_wsgi: Compiled for Python/2.7.8.
[Sun Jan 31 18:38:31.156330 2016] [wsgi:warn] [pid 1049:tid 140557851056000] mod_wsgi: Runtime using Python/2.7.9.
[Sun Jan 31 18:38:31.157222 2016] [mpm_event:notice] [pid 1049:tid 140557851056000] AH00489: Apache/2.4.10 (Debian) SVN/1.8.10 OpenSSL/1.0.1k mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Jan 31 18:38:31.157241 2016] [core:notice] [pid 1049:tid 140557851056000] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jan 31 19:21:39.401930 2016] [mpm_event:notice] [pid 1049:tid 140557851056000] AH00491: caught SIGTERM, shutting down
[Sun Jan 31 19:22:35.038612 2016] [wsgi:warn] [pid 1313:tid 139813423814528] mod_wsgi: Compiled for Python/2.7.8.
[Sun Jan 31 19:22:35.038672 2016] [wsgi:warn] [pid 1313:tid 139813423814528] mod_wsgi: Runtime using Python/2.7.9.
[Sun Jan 31 19:22:35.039592 2016] [mpm_event:notice] [pid 1313:tid 139813423814528] AH00489: Apache/2.4.10 (Debian) SVN/1.8.10 OpenSSL/1.0.1k mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Jan 31 19:22:35.039611 2016] [core:notice] [pid 1313:tid 139813423814528] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jan 31 19:24:57.303622 2016] [mpm_event:notice] [pid 1313:tid 139813423814528] AH00491: caught SIGTERM, shutting down
[Sun Jan 31 19:26:20.336578 2016] [wsgi:warn] [pid 1050:tid 140178825381760] mod_wsgi: Compiled for Python/2.7.8.
[Sun Jan 31 19:26:20.336805 2016] [wsgi:warn] [pid 1050:tid 140178825381760] mod_wsgi: Runtime using Python/2.7.9.
[Sun Jan 31 19:26:20.337601 2016] [mpm_event:notice] [pid 1050:tid 140178825381760] AH00489: Apache/2.4.10 (Debian) SVN/1.8.10 OpenSSL/1.0.1k mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Jan 31 19:26:20.337617 2016] [core:notice] [pid 1050:tid 140178825381760] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jan 31 19:31:24.663351 2016] [mpm_event:notice] [pid 1050:tid 140178825381760] AH00491: caught SIGTERM, shutting down
[Sun Jan 31 19:31:25.827873 2016] [wsgi:warn] [pid 1208:tid 139958437914496] mod_wsgi: Compiled for Python/2.7.8.
[Sun Jan 31 19:31:25.827919 2016] [wsgi:warn] [pid 1208:tid 139958437914496] mod_wsgi: Runtime using Python/2.7.9.
[Sun Jan 31 19:31:25.828655 2016] [mpm_event:notice] [pid 1208:tid 139958437914496] AH00489: Apache/2.4.10 (Debian) SVN/1.8.10 OpenSSL/1.0.1k mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Jan 31 19:31:25.828679 2016] [core:notice] [pid 1208:tid 139958437914496] AH00094: Command line: '/usr/sbin/apache2'
这是否来自 mod_wsgi 正在运行的 Python 版本,该版本与 mod_wsgi 显然期望的不同?
尝试两个命令:
sudo apt-get purge apache2
sudo apt-get install apache2
之后使用 systemctl status apache2 检查 apache 的状态
这些命令解决了我的问题:
sudo apt-get remove apache2
sudo apt-get install apache2
注意:如果您使用
purge
作为另一个答案,您应该再次设置所有 Apache 配置,但是当您使用 remove
时,它只会删除 Apache 的核心,安装后您不再需要任何东西。