Apache错误日志可能具有更多信息...

时间:2018-12-10 09:53:13

标签: apache certbot

由于CERTBOT,我正在尝试安装SSL证书,但是以某种方式我无法重新启动apache或运行“ apachectl configtest”。

这就是我得到的:

  

Blockquote   AH00526:/etc/apache2/sites-enabled/DLI-le-ssl.fr.conf的第42行的语法错误:   无效命令'41,14',可能是服务器配置中未包含的模块拼写错误或定义了   动作“ configtest”失败。   Apache错误日志可能包含更多信息。

确实我的/var/log/apache2/error.log文件存在但为空,这是我的virtualhost conf:

<VirtualHost *:80>

ServerName debout-les-idees.fr
ServerAlias www.debout-les-idees.fr

RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

<VirtualHost *:443>

ServerName debout-les-idees.fr
ServerAlias www.debout-les-idees.fr

DocumentRoot /var/www/DLI.fr/public

<Directory /var/www/DLI.fr/public>
    Options -Indexes
    AllowOverride all
    Order allow,deny
    allow from all
</Directory>

SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/debout-les-idees.fr/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/debout-les-idees.fr/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/debout-les-idees.fr/chain.pem
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCompression off
SSLOptions +StrictRequire
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

LogLevel warn
ErrorLog /var/log/apache2/DLI.fr_error.log
CustomLog /var/log/apache2/DLI.fr_access.log combined
</VirtualHost>

有人知道我的配置出了什么问题吗? 感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

我发现这里出了什么问题

我必须输入的error.log文件的名称错误

 ErrorLog ${APACHE_LOG_DIR}/www.debout-les-idees.fr-error.log
 CustomLog ${APACHE_LOG_DIR}/www.debout-les-idees.fr-access.log combined

代替

 ErrorLog /var/log/apache2/DLI.fr_error.log
 CustomLog /var/log/apache2/DLI.fr_access.log combined

因为我的域名是“ debout-les-idees.fr”,而不是“ DLI.fr”