現在、動かしているApacheにgzip圧縮を有効にさせたいです。
ゴールとしては、以下のURLにウェブサイトのURLを実行した時の
https://developers.google.com/speed/pagespeed/insights/?hl=ja
スコアを100に近づけたいのです
以下の内容が現在のApacheの設定の概要となります。
ini
1#ドメイン01 2<VirtualHost *:80> 3 DocumentRoot /home/webtest/public_html_01 4 ServerName 01.sample.com:80 5 6 <Directory "/home/webtest/public_html_01"> 7 DirectoryIndex index.html index.php 8 Options FollowSymLinks 9 AllowOverride All 10 Order allow,deny 11 Allow from all 12 </Directory> 13 14</VirtualHost> 15 16#ドメイン02 17<VirtualHost *:80> 18 DocumentRoot /home/webtest/public_html_02 19 ServerName 02.sample.com:80 20 21 <Directory "/home/webtest/public_html_02"> 22 DirectoryIndex index.html index.php 23 Options FollowSymLinks 24 AllowOverride All 25 Order allow,deny 26 Allow from all 27 </Directory> 28 29</VirtualHost> 30 31#ドメイン03 32<VirtualHost *:80> 33 DocumentRoot /home/webtest/public_html_03 34 ServerName 03.sample.com:80 35 36 <Directory "/home/webtest/public_html_03"> 37 DirectoryIndex index.html index.php 38 Options FollowSymLinks 39 AllowOverride All 40 Order allow,deny 41 Allow from all 42 </Directory> 43 44</VirtualHost> 45
上記のような3つのマルチドメインで動いています。
この3つのドメイン全てに、gzipで圧縮した内容をブラウザに送信したいのです。
一度、検索したサイトなどなどを見るに以下のような記述でgzipが動作すると書いてあったので追記したみたのですが
content-encoding : gzipというレスポンスヘッダーはみあたりませんでした。
ini
1#追記例 2<Location /> 3SetOutputFilter DEFLATE 4</Location> 5
上記のように3つのマルチドメインに対して、画像ファイルおよびjsやHTML、css問わず全てにgzip圧縮を反映させるためのhttpd.confの書き方をご教授ください。
あなたの回答
tips
プレビュー