{"id":87,"date":"2013-01-31T10:30:39","date_gmt":"2013-01-31T02:30:39","guid":{"rendered":"http:\/\/www.datarelab.com\/blog\/?p=87"},"modified":"2013-01-31T10:30:39","modified_gmt":"2013-01-31T02:30:39","slug":"%e5%9c%a8wamp%e7%8e%af%e5%a2%83%e5%90%af%e7%94%a8gzip","status":"publish","type":"post","link":"https:\/\/www.datarelab.com\/blog\/Technical_literature\/87.html","title":{"rendered":"\u5728WAMP\u73af\u5883\u542f\u7528GZIP"},"content":{"rendered":"<p>\u5982\u679c\u4f60\u53ea\u662f\u5728\u672c\u5730\u7528WAMP(<a href=\"http:\/\/www.wampserver.com\">www.wampserver.com<\/a>)\u5f00\u53d1\u7f51\u7ad9\uff0c\u4f60\u53ef\u80fd\u5e76\u4e0d\u9700\u8981\u5f00\u542fgzip(\u5f53\u4e00\u4e2a\u9875\u9762\u6587\u4ef6\u88ab\u8bf7\u6c42\u65f6\uff0c\u670d\u52a1\u5668\u7aef\u4f1a\u538b\u7f29\u8fd9\u4e2a\u6587\u4ef6\u6765\u51cf\u5c11\u53d1\u9001\u4f53\u79ef)\u3002<br \/>\n\u4e0d\u7ba1\u600e\u4e48\u8bf4\uff0c\u5b83\u8fd8\u662f\u5f88\u6709\u7528\u7684\uff0c\u80fd\u8ba9\u4f60\u5728\u4e0a\u4f20\u7f51\u7ad9\u4e4b\u524d\u770b\u5230\u4e00\u4e2a\u9875\u9762\u53ef\u80fd\u88ab\u4f60\u7684\u5b9e\u9645\u670d\u52a1\u5668\u538b\u7f29\u4e86\u591a\u5c11\u3002<br \/>\n\u5f00\u542fgzip\u5b9e\u9645\u4e0a\u975e\u5e38\u5bb9\u6613\uff0c\u4f46\u662f\u6211\u53d1\u73b0\u5927\u591a\u6570\u5df2\u5b58\u7684\u5efa\u8bae\u90fd\u662f\u9519\u7684\u3002\u4e0b\u9762\u8bf4\u660e\u6211\u8fd9\u91cc\u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1a<br \/>\n1\uff0c\u5f00\u542fApache\u7684 deflate_module \u548c headers_module\u3002\uff08\u8bd1\u8005\u6ce8\uff1a\u8fd9\u91cc\u91c7\u7528\u4e86\u8bd1\u8005\u5b9e\u9645\u5b9e\u73b0\u7684\u65b9\u5f0f\u3002\uff09<br \/>\n&nbsp;&nbsp; \u53bb\u6389 #LoadModule headers_module modules\/mod_headers.so \u524d\u9762\u7684\u6ce8\u91ca#<br \/>\n&nbsp;&nbsp; \u53bb\u6389 #LoadModule deflate_module modules\/mod_deflate.so \u524d\u9762\u7684\u6ce8\u91ca#<br \/>\n&nbsp;&nbsp; \u4e0a\u9762\u4e24\u6bb5\u5982\u679c\u914d\u7f6e\u6587\u4ef6\u4e2d\u6ca1\u6709\u5c31\u81ea\u5df1\u52a0\u4e0a\u3002<br \/>\n2\uff0c\u7f16\u8f91httpd.conf\uff0c\u5728\u6587\u4ef6\u672b\u5c3e\uff0cinclude\u6587\u4ef6\u4e4b\u524d\u52a0\u5165\u5982\u4e0b\u7247\u6bb5\uff08\u6ce8\u610fifmodule\u6807\u7b7e\u4e4b\u95f4\u7684\u6587\u5b57\u662f\u4e00\u884c\uff0c\u4e0d\u8981\u6253\u65ad\uff09\uff1a<br \/>\n<span style=\"color:#e53333;\">&lt;ifmodule mod_deflate&gt;<\/span><br \/>\n<span style=\"color:#e53333;\">AddOutputFilterByType DEFLATE text\/html text\/plain text\/xml text\/css text\/javascript application\/x-javascript application\/javascript<\/span><\/p>\n<p>\n\t<span style=\"color:#e53333;\">&lt;\/ifmodule&gt;<\/span>\n<\/p>\n<p>\n\t<span style=\"color:#e53333;\">\u6216\u8005\u6539\u6210\uff1a<\/span>\n<\/p>\n<p>\n\t<span style=\"color:#e53333;\">php_value output_handler ob_gzhandler<br \/>\n<\/span>\n<\/p>\n<p>\n\t<span style=\"color:#e53333;\">AddOutputFilter DEFLATE html xml php js css<br \/>\n<\/span>\n<\/p>\n<p>3\uff0c \u91cd\u542f\u670d\u52a1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u4f60\u53ea\u662f\u5728\u672c\u5730\u7528WAMP(www.wampserver.com)\u5f00\u53d1\u7f51\u7ad9\uff0c\u4f60\u53ef\u80fd\u5e76\u4e0d\u9700\u8981\u5f00\u542fgzip(\u5f53\u4e00\u4e2a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[28],"class_list":["post-87","post","type-post","status-publish","format-standard","hentry","category-Technical_literature","tag-php"],"views":1455,"_links":{"self":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/87","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":0,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}