Apache2 启动失败,没有错误日志 [英] Failed Apache2 start, no error log

查看:70
本文介绍了Apache2 启动失败,没有错误日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会重新启动 Apache2 但出现错误

I would restart Apache2 but there comes an Error

$ sudo service apache2 start

Starting web server apache2

Action 'start' failed.
The Apache error log may have more information.

但是/var/log/apache2/"中的所有错误日志都是空的.

But all error logs in "/var/log/apache2/" are empty.

文件位于/var/log/apache2",并且有几个来自先前问题的条目,但此任务不会创建任何新条目...

The Files are at "/var/log/apache2" and there are several entries from previous Problems but this Task doesn't create any new etry ...

问题出在哪里?

这是 SSL 证书中的错误,并且在 vHost 配置中更改了error.log"的路径.

It was a error in the SSL Certificate and the path to the "error.log" are changed in the vHost configuration.

如果您不需要 SSL(我不需要,因为我运行的是本地系统)只需禁用所有配置中的 vHost HTTPS/SSL 条目通过命令行输出.

If you don't need SSL (i don't because i'm running a local system) simply disable all vHost HTTPS/SSL entrys in the configuration by command line for line out.

推荐答案

谢谢,蒂姆!对我来说是个大树桩.其他人可能会觉得有帮助的其他一些细节:

Thanks, Tim! Big stumper for me. A few other details others may find helpful:

(Ubuntu 12.04 上的 Apache2)

(Apache2 on Ubuntu 12.04)

我有两个站点在同一台服务器上运行,并且刚刚更新了其中一个站点的 SSL 证书.重新启动服务器后,我收到了那个神秘的消息,两个站点都没有工作(显然).我也在配置文件中找到了日志文件的重定向.我跟踪并发现了问题(在我刚刚更新的站点的日志文件中).

I have two sites running on the same server and had just updated the SSL cert for one of them. Upon restarting the server, I got that cryptic message and neither site worked (obviously). I too found the redirect for the log files in the config files. I tracked that down and found the issue (in the log file for the site I had just updated).

我的配置文件位于/etc/apache2/sites-available

My config files are located in /etc/apache2/sites-available

vim 或 cat 文件 (cat {filename}) 并查找 ErrorLog 行.这会告诉您在服务器上查看的位置.cat 该文件和我发现的错误消息是:

vim or cat the file (cat {filename}) and look for the ErrorLog line. That tells you where to look on your server. cat that file and the error message I found was:

[error] Unable to configure RSA server private key
[error] SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[warn] RSA server certificate CommonName (CN) `<snip>.com' does NOT match server name!?

我将我的一个证书文件复制到了错误的目录中.我只是将它移动到正确的目录,下次开始时一切都很好.(提示:这些文件应该在配置文件中的位置;)

I had copied one of my cert files to the wrong directory. I simply moved it to the correct directory and everything was fine on the next start. (tip: where those file should be is also in the config file ;)

这篇关于Apache2 启动失败,没有错误日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆