Apache mod_deflate模块用于在向客户端提供服务之前压缩内容。仅当您的托管提供商在 Apache 中启用了 mod_deflate 模块时,您才可以配置压缩。
WHM 管理员可以全局启用 Gzip对于所有使用 WHM 控制面板的 cPanel 帐户。非 cPanel 用户可以启用 gzip阿帕奇网络服务器 or Nginx 网络服务器使用命令行。
让我们按照以下步骤使用 cPanel Web 界面启用 Apache gzip 压缩。
第 1 步 – 登录 cPanel 帐户
首先使用网络界面登录您的 cPanel 帐户。默认 cPanel 接口可通过端口 2083 (SSL) 和 2082(非 SSL)访问。 cPanel 访问的默认 URL 可能类似于:
https://mydomain.com:2083
使用 cPanel 凭据登录。
第 2 步 – 打开优化网站面板
登录 cPanel 帐户后,您将在“软件”部分下找到“优化网站”选项。只需单击“优化网站”图标即可打开设置。
步骤 3 – 启用 Apache Gzip 压缩
在此页面上,您将找到三个选项可供选择。获取以下每个选项的详细信息并选择适当的选项。
-
Disabled – Select this option to disable gzip compression for you website and click Update Settings.
-
Compress all content – Select this option to compress all your website’s content and click Update Settings.
-
Compress the specified MIME types – Select this option and input the MIME types in below text box to compress specific files only and click Update Settings. MIME types list on Wikipedia
你们都已经完成了。您已成功为您的站点启用 Gzip 压缩。使用这个链接来验证压缩情况。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)