首页 文章

Apache错误日志可能包含更多信息......

提问于
浏览 281
0

感谢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文件存在但是为空,这是我的虚拟主机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

    我发现这里出了什么问题:

    我必须把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”

相关问题