메뉴 건너뛰기

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
DSO 모듈로 설치되 있을 경우 재컴파일 없이 모듈추가 가능합니다.
1. 기설치된 버전에 아파치 압축해제 후 모듈폴더로 이동
#tar zxvf ./httpd-2.x.x.tar.gz
#cd httpd-2.x.x/modules/mappers
2. 모듈컴파일
#/usr/local/httpd/bin/apxs -a -i -c mod_expires.c
3. 모듈생성확인 후 httpd.conf 파일에 모듈 추가
#cd /usr/local/httpd/modules 폴터에 mod_expires 파일 확인
#vi /usr/local/httpd/conf/httpd.conf 파일에
LoadModule expires_module modules/mod_expires.so 라인추가
4. httpd.conf 설정파일 확인후 아파치 재시작
#/usr/local/httpd/bin/apachectl configrest
#/usr/local/httpd/bin/apachectl restart



2. mod_expires 설정
이미지 서버에 지정한 다음 예를 보자.

    ExpiresActive On
    ExpiresDefault "access plus 1 month"

   # 제외할 디렉토리
    
    ExpiresActive Off
    


- ExpiresActive On 지시자로 Expires 설정을 enable 한다.
- ExpiresDefault "access plus 1 month" 지시자는 액세스한지 얼마나 지나서 expire할 것인지를 지정한다. 즉, 지정한 기간만큼 클라이언트에 캐싱이 된다. 위에는 1달이다.
이외에 클라이언트에서 액세스한지 1달, 4주, 30일, 1년 등과 같은 expire 주기와 서버의 파일의 수정 시간으로 expire 주기를 설정할 수 있다.
ExpiresDefault "access plus 1 month"
ExpiresDefault "access plus 4 weeks"
ExpiresDefault "access plus 30 days"
ExpiresDefault "access plus 1 years"
ExpiresDefault "modification plus 30 days"
설정 마지막부분에 Directory 지시자와 ExpiresActive Off 설정을 통해 특정 디렉토리만 expire 설정에서 제외할 수 있다.
반대로 특정 디렉토리만 On으로도 설정할 수 있다. (일반 웹서버에 /images 와 같이 디렉토리가 있는 경우)
ExpiresByType image/gif "access plus 4 weeks"
ExpiresByType text/html "access plus 1 weeks"
- 위처럼 파일의 유형으로도 가능하다.


3. 확인





IE의 경우 '도구 > 인터넷 옵션 > 임시인터넷파일 > 설정 > 파일보기'에서 확인이 가능합니다.
참고로 [다음(daum)] 의 이미지 서버는 28일(4주)로 [야후!코리아] 는 5년으로 설정되어 있다.

  1. No Image 27Feb
    by
    2014/02/27 Views 8696 

    iptables + 스크립트를 이용한 중국 IP 차단

  2. No Image 27Feb
    by
    2014/02/27 Views 12306 

    원격 접속 FreeNX (NOMACHINE) 설치/접속 (vnc 보다 훨

  3. No Image 27Feb
    by
    2014/02/27 Views 7320 

    find 명령어 정리

  4. No Image 27Feb
    by
    2014/02/27 Views 7749 

    yum 업데이트 빠르게 하기 (yum-fastestmirror 플러그인

  5. No Image 27Feb
    by
    2014/02/27 Views 14276 

    bash 스크립트에서 네트워크 정보 확인하기

  6. No Image 27Feb
    by
    2014/02/27 Views 7699 

    리눅스 - 동시접속자 확인 방법

  7. No Image 27Feb
    by
    2014/02/27 Views 8051 

    특정 데몬의 메모리 점유율 확인하기

  8. No Image 27Feb
    by
    2014/02/27 Views 7836 

    리눅스에서 윈도우 파일시스템 마운트하기

  9. No Image 27Feb
    by
    2014/02/27 Views 7287 

    find명령과 grep명령을 이용하여 파일안의 문자열 찾기

  10. No Image 27Feb
    by
    2014/02/27 Views 7315 

    SAMBA 설치

  11. No Image 27Feb
    by
    2014/02/27 Views 7322 

    Linux 사용자 계정 추가 및 도메인 연결과정

  12. No Image 27Feb
    by
    2014/02/27 Views 7667 

    apache, mod_ssl 설치 (apache 1.3.37버전)

  13. No Image 27Feb
    by
    2014/02/27 Views 7110 

    리눅스 NFS (네트워크 파일 시스템 ) 설치하기

  14. No Image 27Feb
    by 조쉬
    2014/02/27 Views 7862 

    mod_expires 모듈 추가 및 이미지 캐싱 설정방법

  15. No Image 27Feb
    by
    2014/02/27 Views 7351 

    대용량 HDD 파티셔닝(Mass storage Partitioning)

  16. No Image 27Feb
    by
    2014/02/27 Views 7482 

    webmin 설치하기

  17. webmin 설치하기

  18. No Image 27Feb
    by
    2014/02/27 Views 7940 

    LINUX - 특정 파일이 속한 RPM 패키지 확인 및 설정 파일 경로

  19. No Image 27Feb
    by
    2014/02/27 Views 7929 

    ethtool을 이용한 랜카드 설정

  20. No Image 27Feb
    by
    2014/02/27 Views 7021 

    telnet 설정하기

Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 Next
/ 12

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved