kangle web server设置 mime类型 最强谷歌优化设置,增加浏览器缓存,加快web访问速度
下面列举出一些常用的格式,可以更加需要来添加。3gp video/3gpp 31536000
avi video/x-msvideo 31536000
css text/css yes 31536000
dll application/octet-stream 31536000
doc application/msword 31536000
exe application/octet-stream 31536000
flv video/x-flv 31536000
gif image/gifyes 31536000
gz application/x-tar 31536000
htm text/html yes 31536000
html text/html yes 31536000
ico image/x-iconyes 31536000
jpg image/jpegyes 31536000
js text/javascript yes 31536000
mp3 audio/mpeg 31536000
mp4 video/mp4 31536000
png image/pngyes 31536000
rar application/x-rar-compressed 31536000
sh application/x-sh 31536000
swf application/x-shockwave-flash 31536000
tarapplication/x-tar 31536000
xmltext/xml yes 31536000
zipapplication/x-zip-compressed 31536000
bmpimage/x-bmpyes 31536000
pactext/plainyes 31536000
31536000是谷歌推荐使用的,百度用的315360000(十年)。腾讯用的是600。
谷歌官方文档
http://bbs.itzmx.com/thread-7300-1-1.html
想要所有文本内容,图片都压缩缓存的话,可以改配置文件
<vhs >
<mime_type ext='*' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='3gp' type='video/3gpp' max_age='31536000'/>
<mime_type ext='3gpp' type='video/3gpp' max_age='31536000'/>
<mime_type ext='ai' type='application/postscript' max_age='31536000'/>
<mime_type ext='aif' type='audio/x-aiff' max_age='31536000'/>
<mime_type ext='aifc' type='audio/x-aiff' max_age='31536000'/>
<mime_type ext='aiff' type='audio/x-aiff' max_age='31536000'/>
<mime_type ext='amr' type='audio/amr' max_age='31536000'/>
<mime_type ext='arj' type='application/x-arj-compressed' max_age='31536000'/>
<mime_type ext='atom' type='application/atom+xml' max_age='31536000'/>
<mime_type ext='au' type='audio/basic' max_age='31536000'/>
<mime_type ext='avi' type='video/x-msvideo' max_age='31536000'/>
<mime_type ext='bcpio' type='application/x-bcpio' max_age='31536000'/>
<mime_type ext='bin' type='application/macbinary' max_age='31536000'/>
<mime_type ext='bmp' type='image/x-bmp' gzip='1' max_age='31536000'/>
<mime_type ext='c' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='cab' type='application/octet-stream' max_age='31536000'/>
<mime_type ext='cc' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='cdf' type='application/x-netcdf' max_age='31536000'/>
<mime_type ext='cod' type='text/x-co-desc' gzip='1' max_age='31536000'/>
<mime_type ext='core' type='application/octet-stream' max_age='31536000'/>
<mime_type ext='cpio' type='application/x-cpio' max_age='31536000'/>
<mime_type ext='cpp' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='csh' type='application/x-csh' max_age='31536000'/>
<mime_type ext='css' type='text/css' gzip='1' max_age='31536000'/>
<mime_type ext='dll' type='application/octet-stream' max_age='31536000'/>
<mime_type ext='doc' type='application/msword' max_age='31536000'/>
<mime_type ext='dvi' type='application/x-dvi' max_age='31536000'/>
<mime_type ext='ear' type='application/java-archive' max_age='31536000'/>
<mime_type ext='eps' type='application/postscript' max_age='31536000'/>
<mime_type ext='etx' type='text/x-setext' gzip='1' max_age='31536000'/>
<mime_type ext='exe' type='application/octet-stream' max_age='31536000'/>
<mime_type ext='f90' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='flv' type='video/x-flv' max_age='31536000'/>
<mime_type ext='gif' type='image/gif' gzip='1' max_age='31536000'/>
<mime_type ext='gtar' type='application/x-gtar' max_age='31536000'/>
<mime_type ext='gz' type='application/x-tar' max_age='31536000'/>
<mime_type ext='h' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='hdf' type='application/x-hdf' max_age='31536000'/>
<mime_type ext='hh' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='hqx' type='application/mac-binhex40' max_age='31536000'/>
<mime_type ext='htm' type='text/html' gzip='1' max_age='31536000'/>
<mime_type ext='html' type='text/html' gzip='1' max_age='31536000'/>
<mime_type ext='ico' type='image/x-icon' gzip='1' max_age='31536000'/>
<mime_type ext='ief' type='image/ief' gzip='1' max_age='31536000'/>
<mime_type ext='jad' type='text/vnd.sun.j2me.app-descriptor' gzip='1' max_age='31536000'/>
<mime_type ext='jar' type='application/java-archive' max_age='31536000'/>
<mime_type ext='jng' type='image/x-jng' gzip='1' max_age='31536000'/>
<mime_type ext='jpe' type='image/jpeg' gzip='1' max_age='31536000'/>
<mime_type ext='jpeg' type='image/jpeg' gzip='1' max_age='31536000'/>
<mime_type ext='jpg' type='image/jpeg' gzip='1' max_age='31536000'/>
<mime_type ext='js' type='application/x-javascript' gzip='1' max_age='31536000'/>
<mime_type ext='latex' type='application/x-latex' max_age='31536000'/>
<mime_type ext='lha' type='application/x-lha-compressed' max_age='31536000'/>
<mime_type ext='lsm' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='lzh' type='application/x-lha-compressed' max_age='31536000'/>
<mime_type ext='m' type='text/plain' gzip='1' max_age='31536000'/>
<mime_type ext='man' type='application/x-troff-man' max_age='31536000'/>
<mime_type ext='mbm' type='image/x-epoc-mbm' gzip='1' max_age='31536000'/>
<mime_type ext='me' type='application/x-troff-me' max_age='31536000'/>
<mime_type ext='mid' type='audio/midi' max_age='31536000'/>
<mime_type ext='midi' type='audio/midi' max_age='31536000'/>
<mime_type ext='mif' type='application/x-mif' max_age='31536000'/>
<mime_type ext='mmf' type='application/x-smaf' max_age='31536000'/>
<mime_type ext='mml' type='text/mathml' gzip='1' max_age='31536000'/>
<mime_type ext='mov' type='video/quicktime' max_age='31536000'/>
<mime_type ext='movie' type='video/x-sgi-movie' max_age='31536000'/>
<mime_type ext='mp2' type='audio/basic' max_age='31536000'/>
<mime_type ext='mp3' type='audio/mpeg' max_age='31536000'/>
<mime_type ext='mp4' type='video/mp4' max_age='31536000'/>
<mime_type ext='mpe' type='video/mpeg' max_age='31536000'/>
<mime_type ext='mpeg' type='video/mpeg' max_age='31536000'/>
<mime_type ext='mpg' type='video/mpeg' max_age='31536000'/>
<mime_type ext='ms' type='application/x-troff-ms' max_age='31536000'/>
<mime_type ext='msw' type='application/msword' max_age='31536000'/>
<mime_type ext='mwrt' type='application/macwriteii' max_age='31536000'/>
<mime_type ext='n3a' type='image/vnd.nok-3dscreensaver' gzip='1' max_age='31536000'/>
<mime_type ext='nc' type='application/x-netcdf' max_age='31536000'/>
<mime_type ext='ngd' type='application/x-nokiagamedata' max_age='31536000'/>
<mime_type ext='nok' type='image/vnd.nok-oplogo-colornokia-op-logo' gzip='1' max_age='31536000'/>
<mime_type ext='nqd' type='application/vnd.nokia.gamedata' max_age='31536000'/>
<mime_type ext='oda' type='application/oda' max_age='31536000'/>
<mime_type ext='pbm' type='image/x-portable-bitmap' gzip='1' max_age='31536000'/>
<mime_type ext='pdf' type='application/pdf' max_age='31536000'/>
<mime_type ext='pgm' type='image/x-portable-graymap' gzip='1' max_age='31536000'/>
<mime_type ext='pic' type='application/pict' max_age='31536000'/>
<mime_type ext='pict' type='application/pict' max_age='31536000'/>
<mime_type ext='pmd' type='application/x-pmd' max_age='31536000'/>
<mime_type ext='png' type='image/png' gzip='1' max_age='31536000'/>
<mime_type ext='pnm' type='image/x-portable-anymap' gzip='1' max_age='31536000'/>
<mime_type ext='ppm' type='image/x-portable-pixmap' gzip='1' max_age='31536000'/>
<mime_type ext='ps' type='application/postscript' max_age='31536000'/>
<mime_type ext='qcp' type='audio/vnd.qcelp' max_age='31536000'/>
<mime_type ext='qt' type='video/quicktime' max_age='31536000'/>
<mime_type ext='rar' type='application/x-rar-compressed' max_age='31536000'/>
<mime_type ext='ras' type='image/cmu-raster' gzip='1' max_age='31536000'/>
<mime_type ext='rgb' type='image/x-rgb' gzip='1' max_age='31536000'/>
<mime_type ext='rng' type='application/vnd.nokie.ringing-tone' max_age='31536000'/>
<mime_type ext='roff' type='application/x-troff' max_age='31536000'/>
<mime_type ext='rpm' type='application/x-rpm' max_age='31536000'/>
<mime_type ext='rss' type='application/rss+xml' max_age='31536000'/>
<mime_type ext='rtf' type='application/x-rtf' max_age='31536000'/>
<mime_type ext='rtx' type='text/richtext' gzip='1' max_age='31536000'/>
<mime_type ext='sh' type='application/x-sh' max_age='31536000'/>
<mime_type ext='shar' type='application/x-shar' max_age='31536000'/>
<mime_type ext='si' type='text/vnd.wap.si' gzip='1' max_age='31536000'/>
<mime_type ext='sic' type='application/vnd.wap.sic' max_age='31536000'/>
<mime_type ext='sis' type='application/vnd.symbian.install' max_age='31536000'/>
<mime_type ext='sit' type='application/stuffit' max_age='31536000'/>
<mime_type ext='sl' type='text/vnd.wap.sl' gzip='1' max_age='31536000'/>
<mime_type ext='slc' type='application/vnd.wap.slc' max_age='31536000'/>
<mime_type ext='snd' type='audio/basic' max_age='31536000'/>
<mime_type ext='src' type='application/x-wais-source' max_age='31536000'/>
<mime_type ext='sv4cpio' type='application/x-sv4cpio' max_age='31536000'/>
<mime_type ext='sv4crc' type='application/x-sv4crc' max_age='31536000'/>
<mime_type ext='svg' type='image/svg+xml' gzip='1' max_age='31536000'/>
<mime_type ext='svgz' type='image/svg+xml' gzip='1' max_age='31536000'/>
<mime_type ext='swf' type='application/x-shockwave-flash' max_age='31536000'/>
<mime_type ext='t' type='application/x-troff' max_age='31536000'/>
<mime_type ext='tar' type='application/x-tar' max_age='31536000'/>
<mime_type ext='tcl' type='application/x-tcl' max_age='31536000'/>
<mime_type ext='tex' type='application/x-tex' max_age='31536000'/>
<mime_type ext='texi' type='application/x-texinfo' max_age='31536000'/>
<mime_type ext='texinfo' type='application/x-texinfo' max_age='31536000'/>
<mime_type ext='tgz' type='application/x-tar' max_age='31536000'/>
<mime_type ext='tif' type='image/tiff' gzip='1' max_age='31536000'/>
<mime_type ext='tiff' type='image/tiff' gzip='1' max_age='31536000'/>
<mime_type ext='tr' type='application/x-troff' max_age='31536000'/>
<mime_type ext='tsv' type='text/tab-separated-values' gzip='1' max_age='31536000'/>
<mime_type ext='ustar' type='application/x-ustar' max_age='31536000'/>
<mime_type ext='vcf' type='text/v-vcard' gzip='1' max_age='31536000'/>
<mime_type ext='vcs' type='text/x-vcalendar' gzip='1' max_age='31536000'/>
<mime_type ext='war' type='application/java-archive' max_age='31536000'/>
<mime_type ext='wav' type='audio/x-wav' max_age='31536000'/>
<mime_type ext='wbmp' type='image/vnd.wap.wmbp' gzip='1' max_age='31536000'/>
<mime_type ext='webm' type='video/webm' max_age='31536000'/>
<mime_type ext='webp' type='image/webp' gzip='1' max_age='31536000'/>
<mime_type ext='wml' type='text/vnd.wap.wml' gzip='1' max_age='31536000'/>
<mime_type ext='wmlc' type='application/vnd.wap.wmlc' max_age='31536000'/>
<mime_type ext='wmls' type='text/vnd.wap.wmlscript' gzip='1' max_age='31536000'/>
<mime_type ext='wmlsc' type='text/vnd.wap.wmlscript' gzip='1' max_age='31536000'/>
<mime_type ext='wmv' type='video/x-ms-wmv' max_age='31536000'/>
<mime_type ext='xbm' type='image/x-xbitmap' gzip='1' max_age='31536000'/>
<mime_type ext='xls' type='application/msexcel' max_age='31536000'/>
<mime_type ext='xml' type='text/xml' gzip='1' max_age='31536000'/>
<mime_type ext='xpm' type='image/x-xpixmap' gzip='1' max_age='31536000'/>
<mime_type ext='xwd' type='image/x-xwindowdump' gzip='1' max_age='31536000'/>
<mime_type ext='Z' type='application/x-tar' max_age='31536000'/>
<mime_type ext='zip' type='application/x-zip-compressed' max_age='31536000'/>
<mime_type ext='zlib' type='application/x-deflate' max_age='31536000'/>
</vhs>
收了,待会去测试下
怎么修改??? sinerogue 发表于 2016/11/17 17:46
怎么修改???
3311 小樱 发表于 2016/11/17 19:18
3311
这里只能一个个的修改。,我想全部改成谷歌推荐的 sinerogue 发表于 2016/11/17 20:35
这里只能一个个的修改。,我想全部改成谷歌推荐的
配置文件,直接覆盖下方
页:
[1]