아파치 2.4.x 에서 mod_deflate 로 압축 전송 설정하기
페이지 정보
작성자 관리자 (61.♡.26.29) 작성일 18-02-17 17:32 조회 1,986 댓글 0본문
[code]
<IfModule mod_deflate.c>
# 필터를 추가한다
#SetOutputFilter DEFLATE
# 특별한 MIME type만 압축
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css text/javascript text/x-javascript application/javascript application/x-javascript
# 압축률을 지정
DeflateCompressionLevel 9
# Netscape 4.x에 문제가 있다...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08에 더 문제가 있다
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE은 Netscape라고 자신을 알리지만, 문제가 없다
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# 압축하지 않을 파일들을 지정
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|bmp|zip|tar|rar|alz|a00|ace|txt|mp3|mpe?g|wav|asf|wma|wmv|swf|exe|pdf|doc|xsl|hwp|java|c|t?gz|bz2|7z)$ no-gzip dont-vary
# 프록시가 잘못된 내용을 전달하지않도록 한다
Header append Vary User-Agent env=!dont-vary
</IfModule>
[/code]
* 참고 :
https://httpd.apache.org/docs/2.2/ko/mod/mod_deflate.html
<IfModule mod_deflate.c>
# 필터를 추가한다
#SetOutputFilter DEFLATE
# 특별한 MIME type만 압축
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css text/javascript text/x-javascript application/javascript application/x-javascript
# 압축률을 지정
DeflateCompressionLevel 9
# Netscape 4.x에 문제가 있다...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08에 더 문제가 있다
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE은 Netscape라고 자신을 알리지만, 문제가 없다
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# 압축하지 않을 파일들을 지정
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|bmp|zip|tar|rar|alz|a00|ace|txt|mp3|mpe?g|wav|asf|wma|wmv|swf|exe|pdf|doc|xsl|hwp|java|c|t?gz|bz2|7z)$ no-gzip dont-vary
# 프록시가 잘못된 내용을 전달하지않도록 한다
Header append Vary User-Agent env=!dont-vary
</IfModule>
[/code]
* 참고 :
https://httpd.apache.org/docs/2.2/ko/mod/mod_deflate.html
추천0
댓글목록 0
등록된 댓글이 없습니다.