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

Linux 라즈베리파이 파티션 용량 늘리기 [2]

  • LynX
  • 2016-03-08
  • 조회 수 441

CentOS7 ▒ Doly의 CentOS7 강좌24 8. 파일 및 디렉토리 관리 2 파일관리자 mc file [13]

  • LynX
  • 2015-06-09
  • 조회 수 434

Linux How to install libc-client-devel [2]

  • LynX
  • 2014-11-21
  • 조회 수 434

APM Apache httpd 2.4 mod_deflate file

  • LynX
  • 2016-12-23
  • 조회 수 431

APM apm + ssl file

  • LynX
  • 2014-05-19
  • 조회 수 429

APM APM 설치 수동설치

  • LynX
  • 2013-12-26
  • 조회 수 429

HardWare usb 초기화 - diskpart file

  • LynX
  • 2014-06-17
  • 조회 수 426

디지털 서명 file [1]

  • LynX
  • 2012-03-15
  • 조회 수 426

Programing cab파일 만들기 file

  • LynX
  • 2014-06-13
  • 조회 수 424

APM LZ4_LIBS Not Found (CentOS7, MariaDB 10.1.29)

  • LynX
  • 2018-01-03
  • 조회 수 420

APM hhvm install file

  • LynX
  • 2016-12-28
  • 조회 수 420

Xpress Engine XE 애드온의 제작 규칙

  • LynX
  • 2014-07-11
  • 조회 수 420

APM asp file

  • LynX
  • 2014-05-28
  • 조회 수 419

Linux PlayOnLinux [3]

  • LynX
  • 2014-11-28
  • 조회 수 418

Linux libiconv

  • LynX
  • 2017-12-08
  • 조회 수 417

OpenSolaris Open Solaris 설치 file [12]

  • LynX
  • 2014-12-30
  • 조회 수 417

APM Proxy AJP

  • LynX
  • 2014-05-27
  • 조회 수 417

APM php7에 memcache.so 확장 모듈 적용 file

  • LynX
  • 2016-09-23
  • 조회 수 416

SoftWare 포토샵 버튼 [17]

  • LynX
  • 2015-01-27
  • 조회 수 416

Windows XP USB로 XP 설치하기 file

  • LynX
  • 2013-06-20
  • 조회 수 415

XE Login