Skip to content

2010.07.29 07:57

mod_gzip, mod_deflate

조회 수 19256 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
웹서버의 스트리밍데이타를 압축해서 보내자는 말이 나왔다.

당연히 mod_gzip을 찾아보고 적용 시키는 중에 죽어도 컴파일이 안되는 것이 발생해서...

그럼 php에서 한다고 생각해서 php 모듈을 찾다가 보니 그다지 뾰족한 것이 없었다.

더욱 찬찬히 찾아보니...

웬걸

삽질이었다.

Apache2 이상에서는 mod_gzip 대신에 mod_deflate에서 압축을 담당하는 것이었다.

적용을 해보자

1) httpd.conf
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
가 있는지 확인하자.

2) 적용할 디렉토리를 찾는다.
vhost를 사용하지 않으면 httpd.conf에 있을 것이고
vhost 사용시에는 각 도메인의 디렉토리를 찾는다.

2-1) 모두 압축하고 하지 않을 필터를 설정
<Directory 경로~>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
</Directory>

2-2) 압축할 필터를 설정
<Directory 경로~>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript text/xml application/x-javascript
</Directory>

3) apachectl -k restart
적용 완료 -_-


확인은 httpwatch 같은 것으로 패킷캡쳐 해보면 안다.

참고 site

http://httpd.apache.org/docs-2.0/mod/mod_deflate.html

  1. 아파치 특정폴더에 암호걸기

    Date2008.10.08 ByADMINPLAY Views16195
    Read More
  2. Apache의 Indexes된 페이지에서 한글표시

    Date2009.05.07 ByADMINPLAY Views16403
    Read More
  3. 아파치웹서버 모니터링하기

    Date2009.03.17 ByADMINPLAY Views16628
    Read More
  4. 웹 사이트 속도측정

    Date2009.03.04 ByADMINPLAY Views16637
    Read More
  5. 웹페이지에서 한글이 깨지는 현상 막기

    Date2009.01.03 ByADMINPLAY Views16685
    Read More
  6. 서비스 동시접속 인원알기

    Date2008.10.07 ByADMINPLAY Views17028
    Read More
  7. Apache Worker 방식의 이해 및 설정법

    Date2012.01.16 ByADMINPLAY Views17105
    Read More
  8. h264 스트리밍 서버 구축(리눅스,아파치) (실시간 아님, ...

    Date2012.08.13 ByADMINPLAY Views17370
    Read More
  9. 아파치에서 한글 파일 읽기 [mod_url 설치]

    Date2009.03.17 ByADMINPLAY Views17443
    Read More
  10. apache가 worker 모드인지 prefork 모드로 동작하는지 확인

    Date2013.01.21 Byl2zeo Views17700
    Read More
  11. (간단한 팁) 우분투에 Apache2 설치하기 ( apt-get )

    Date2012.04.01 By로키 Views17778
    Read More
  12. Apache Make시 /usr/lib/libexpat.so: could not read sym...

    Date2009.08.07 ByADMINPLAY Views18076
    Read More
  13. squid 로 웹서버 가속하기..---== 강추 ==---

    Date2009.11.26 ByADMINPLAY Views18364
    Read More
  14. xcache 설치 (xcache-1.2.2.tar.gz)

    Date2009.03.17 ByADMINPLAY Views18482
    Read More
  15. Apache - 도메인 포워딩

    Date2010.08.26 ByADMINPLAY Views18958
    Read More
  16. 아파치 GeoIP를 이용한 국가별 제한

    Date2010.01.30 ByADMINPLAY Views18965
    Read More
  17. 웹방화벽 ModSecurity 룰적용 순서

    Date2010.05.29 Byl2zeo Views19058
    Read More
  18. 아파치(apache) 무단 링크 방지

    Date2011.06.18 ByADMINPLAY Views19135
    Read More
  19. 아파치 2.X 버전에서 mod_cband를 이용한 트래픽관리

    Date2009.01.17 ByADMINPLAY Views19204
    Read More
  20. mod_gzip, mod_deflate

    Date2010.07.29 ByADMINPLAY Views19256
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234