Apache 2 : problem with deflate.conf


#1

Hi,

I try to test the beta version and I have this error:

Running with virtualenv: sudo /home/user/.local/share/letsencrypt/bin/letsencrypt --apache
The apache plugin is not working; there may be problems with your existing configuration.
The error was: PluginError(('There has been an error in parsing the file (%s): %s', u'/etc/apache2/mods-enabled/deflate.conf', u'Syntax error'),)

And my deflate.conf file:

<IfModule mod_deflate.c>
    DeflateCompressionLevel 3
</IfModule>

<Location />
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/atom_xml
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE application/x-httpd-fastphp
    AddOutputFilterByType DEFLATE application/x-httpd-eruby

    SetOutputFilter DEFLATE

    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|apng|webp)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(avi|mov|mp3|mp4|uta|flv|f4v|f4p|f4a|f4b|swf|webm|webp)$ no-gzip dont-vary

    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
</Location>

I never change this file. My question is: what is it problem with this file ?

I use Apache/2.4.12 (Ubuntu)

Best regards.


#2

It’s almost certainly a problem with Augeas and your deflate.conf. If the problem is in Augeas or your configuration file, I dunno, but I’ve found a site which could help you debug the problem: Testing Augeas lenses with augparse on Debian GNU/Linux. I’d say give it a try. Perhaps your configuration file needs a small enhancement, or perhaps the httpd.aug needs a fix.