메뉴 건너뛰기

조회 수 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

    netstat 사용법

    Date2016.12.22 Views8769
    Read More
  2. No Image

    netstat 명령어

    Date2021.03.26 Views210
    Read More
  3. No Image

    netstat [option]

    Date2014.04.12 Views7238
    Read More
  4. No Image

    ncftp 설치및 스크립트 백업 방법

    Date2014.02.27 Views7928
    Read More
  5. No Image

    Mysql 설치시 LinuxThreads 에러 메세지

    Date2014.02.27 Views7501
    Read More
  6. No Image

    MySQL 계정생성하기

    Date2015.07.16 Views7512
    Read More
  7. No Image

    mysql root 비밀번호 설정

    Date2015.07.16 Views7858
    Read More
  8. MySQL Linux Port 방화벽 설정(3306)

    Date2017.03.11 Views9470
    Read More
  9. No Image

    mysql DB 지정 백업 스크립트

    Date2016.03.18 Views8004
    Read More
  10. No Image

    my.cnf 케릭터 셋 설정 (uft8)

    Date2015.07.16 Views7290
    Read More
  11. No Image

    mod_rewrite 예제

    Date2016.12.22 Views7145
    Read More
  12. No Image

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

    Date2014.02.27 Views7862
    Read More
  13. No Image

    mariadb | my.cnf 설정. MariaDB(5.5.37) utf8 설정

    Date2015.07.16 Views7711
    Read More
  14. No Image

    mail 명령어 사용법

    Date2014.03.26 Views7110
    Read More
  15. No Image

    linux 커널 파라메터 수정

    Date2014.02.27 Views7094
    Read More
  16. No Image

    LINUX 싱글부팅

    Date2014.03.26 Views7430
    Read More
  17. No Image

    Linux 시스템 백업과 복원

    Date2014.03.26 Views7862
    Read More
  18. No Image

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

    Date2014.02.27 Views7323
    Read More
  19. No Image

    linux mcrypt 설치 (php 재컴파일 필요)

    Date2014.02.27 Views7824
    Read More
  20. No Image

    Linux LVM구성하기

    Date2014.02.27 Views8218
    Read More
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 Next
/ 12

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

© k2s0o1d4e0s2i1g5n. All Rights Reserved