You cannot see this page without javascript.

Apache httpd 2.4 mod_deflate

APM 조회 수 431 추천 수 0 2016.12.23 11:37:41
먼저 사용할 모듈들을 로드하도록 하고,
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule filter_module modules/mod_filter.so
 
다음과 같은 확장자 규정이 있다면 넘어가고, 없다면 추가한다.

AddType text/html .html .htm
AddType text/css .css
AddType application/xml .xml
AddType application/javascript .js
AddType application/x-httpd-php .php .php3 .html .htm .phtml .inc
AddType application/x-httpd-php-source .phps

 

다음과 같은 유형들은 압축하도록 설정하고,

AddOutputFilterByType DEFLATE text/plain text/html text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml application/xml application/rss+xml
AddOutputFilterByType DEFLATE text/css application/javascript application/x-javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/php
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE audio/midi

 

사용할 압축레벨을 선택하는데, 값이 클수록 압축률이 증가하지만, CPU를 더 많이 사용한다.

기본값은 설치된 gzip설정을 따른다.
#DeflateCompressionLevel 9

 

지원불가능 브라우져에 대한 설정을 한다.

# Netscape 4.xx에는 HTML만 압축해서 보냄
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06~4.08에는 압축해서 보내지 않음
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# 자신을 Mozilla로 알리는 MSIE에는 그대로 압축해서 보냄
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

 

tc-def.png

 

첨부
엮인글 :
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
329 Network vpn LynX 2016-06-29 263
328 웹 페이지의 원하는 테이블만 프린트 LynX 2013-03-15 268
327 Xyview DVR서버 연결 [8] LynX 2012-04-19 269
326 웹 프린트 작업시 픽셀과 밀리미터간의 상관관계 (1mm=3.8px ) [8] LynX 2013-03-15 271
325 Xpress Engine XML 쿼리 대신 직접 mysql 사용하기 LynX 2014-07-19 273
324 CentOS CentOS7 WHEEL 계정 추가 file LynX 2017-02-03 275
323 Windows 윈도우 8 pro key LynX 2014-05-26 277
322 32bit Driver을 64bi로 설치하기 [8] LynX 2011-06-21 282
321 윈도우서버2008 - 06 (보안 정책 및 감사) file [10] LynX 2012-11-28 285
320 Linux Linux Apache 2.4 설치 LynX 2014-06-27 286
319 Linux cinnamon [10] LynX 2014-12-11 287
318 Programing cab파일에 인증서 포함하기 LynX 2014-06-13 293
317 Linux [Linux] 특정 계정만 su -(root)를 통한 root접근 허용 LynX 2014-07-04 294
316 Server Windows7에 Apache 설치 file LynX 2013-09-05 297
315 LinuxMint LinuxMint PHP source 설치 [1] LynX 2014-12-30 297
314 Linux 10 - NFS,apache file [10] LynX 2012-11-29 298
313 Programing print script LynX 2013-12-11 300
312 CentOS7 ▒ Doly의 CentOS7 강좌15 5. CentOS 기본설정 2 - 날짜 및 시간설정 file [6] LynX 2014-10-23 300
311 Windows7 에서 시스템을 백업/복원하는 가장 쉬운 방법!! file LynX 2010-11-07 305
310 Linux 03 - VMware,네트워크,VMware인터넷설정,리눅스인터넷 file LynX 2012-11-29 305

XE Login