by-nc-sa     개발자, DBA가 함께 만들어가는 오라클클럽 지식창고!

mod_expires




mod_expires

mod_expires란

  • mod_expires 모듈을 통해 Expires HTTP header 를 설정 할 수 있다.
  • 이는 apache에서 이미지 캐싱 처리를 쉽게 할 수 있다.
  • 이미지 전용 서버나 이미지 디렉토리에 설정을 하면 효과적이다.

설치

  • apxs로 설치 하면 된다.
/usr/local/env/apache-2.2.14/bin/apxs -aic /usr/local/pkgs/httpd-2.2.14/modules/metadata/mod_expires.c

설정

  • ExpiresActive On 지시자로 Expires 설정을 enable 한다.
  • ExpiresDefault "access plus 1 month" 지시자는 액세스한지 얼마나 지나서 expire할 것인지를 지정한다.
    즉, 지정한 기간만큼 클라이언트에 캐싱이 된다. 위에는 1달이다.
  • 자세한 내용은 Apache document를 참고하기 바란다.
LoadModule expires_module modules/mod_expires.so

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 2 hours"
</IfModule>

문서정보

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.