如何获得Apache(在Debian挤压)压缩JS / CSS

我正在运行Debian挤压,不能让Apache压缩JavaScript或CSS。 但是,HTML正在被压缩。 在网站启用目录中的conf文件,我有以下几点:

<Location /> <IfModule mod_deflate.c> SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html <IfModule mod_headers.c> Header append Vary User-Agent env=!dont-vary </IfModule> </IfModule> </Location> 

深入了解为什么JS / CSS没有被压缩?

编辑:

请求标头的CSS = Accept:text / css,/; q = 0.1,
CSS的响应标题= Content-Type:text / css

指定基于MIMEtypes的压缩时,我从来没有运气过。 我有更好的运气使用FilesMatch,而不是像:

 <FilesMatch "\.(html|js|css)$"> SetOutputFilter DEFLATE BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent env=!dont-vary </FilesMatch> 

由于这个问题已经打开了一段时间,我很好奇你做了什么修复。