Failed Apache2 start, no error log

前端 未结 11 567
轮回少年
轮回少年 2021-02-01 02:41

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 hav         


        
11条回答
  •  一向
    一向 (楼主)
    2021-02-01 03:14

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

    (Apache2 on Ubuntu 12.04)

    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).

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

    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) `.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 ;)

提交回复
热议问题