我需要全局启用 svg 的 gzip,但进展不顺利。我浏览了很多链接,但似乎都不起作用。为了简单起见,下面是步骤
安装 apache 后,我在文件夹 (mysvgtest) 中放置了一个 Index.html 文件,默认位置为 /var/www,我能够从浏览器浏览到该位置并呈现页面,
http://localhost/svgtest/Index.html
我运行“a2enmod deflate”,它显示模块已加载。然后我转到 /etc/apache2/mods-enabled 并打开 deflate.conf,在那里我添加了 AddOutputFilterByType DEFLATE image/svg+xml,我重新启动了 apache,svg 文件没有被 gzip 压缩。还有什么我遗漏的东西吗?我没有看到任何更改压缩级别的选项。
谢谢