Skip to content
조회 수 1658 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

[Apache] mod_expires .htaccess을 수정하여 브라우저 캐싱하기


브라우저 캐싱으로 속도 가속화시키기


클라이언트에서 한번 열어본 이미지 등의 파일은 캐시 안함.


years
months
weeks
days
hours
minutes
seconds




#으로 되어있는 부분 없애고 아파치 재시작


httpd.conf

  LoadModule expires_module modules/mod_expires.so   




.htaccess


#<IfModule mod_expires.so>

ExpiresActive on

 

ExpiresDefault                          "access plus 1 month"

 

ExpiresByType text/cache-manifest       "access plus 0 seconds"

ExpiresByType text/html                 "access plus 0 seconds"

ExpiresByType text/xml                  "access plus 0 seconds"

ExpiresByType application/xml           "access plus 0 seconds"

ExpiresByType application/json          "access plus 0 seconds"

 

ExpiresByType application/rss+xml       "access plus 0 seconds"

ExpiresByType application/atom+xml      "access plus 0 seconds"

 

ExpiresByType image/gif                 "access plus 1 month"

ExpiresByType image/png                 "access plus 1 month"

ExpiresByType image/jpg                 "access plus 1 month"

ExpiresByType image/jpeg                "access plus 1 month"

   

ExpiresByType video/ogg                 "access plus 2 month"

ExpiresByType audio/ogg                 "access plus 2 month"

ExpiresByType video/mp4                 "access plus 2 month"

ExpiresByType video/webm                "access plus 2 month"

   

ExpiresByType text/x-component          "access plus 1 year"

ExpiresByType application/x-font-ttf    "access plus 1 year"

ExpiresByType font/opentype             "access plus 1 year"

ExpiresByType application/x-font-woff   "access plus 1 year"

ExpiresByType image/svg+xml             "access plus 1 year"

ExpiresByType application/vnd.ms-fontobject "access plus 1 year"                              

ExpiresByType text/css                  "access plus 1 year"

ExpiresByType application/javascript    "access plus 1 year"

ExpiresByType image/x-icon              "access plus 1 year"

#</IfModule>





## EXPIRES CACHING ##

<IfModule mod_expires.c>

    ExpiresActive On

    ExpiresByType image/jpg "access plus 1 month"

    ExpiresByType image/jpeg "access plus 1 month"

    ExpiresByType image/gif "access plus 1 month"

    ExpiresByType image/png "access plus 1 month"

    ExpiresByType text/css "access plus 1 month"

    ExpiresByType application/pdf "access plus 1 month"

    ExpiresByType text/x-javascript "access plus 1 month"

    ExpiresByType application/x-shockwave-flash "access plus 1 month"

    ExpiresByType image/x-icon "access plus 1 month"

    ExpiresDefault "access plus 1 month"

</IfModule> 





로그인 후 댓글쓰기가 가능합니다.

?

  1. 26
    Mar 2016
    09:35

    XCOPY로 중요파일 백업하기

    CategoryServer Views1981
    Read More
  2. 26
    Mar 2016
    09:08

    아파치 httpd.conf 재시작 없이 설정 적용하기

    CategoryServer Views4277
    Read More
  3. 25
    Mar 2016
    08:58

    [아파치 error.log] Fatal Error Unable to reattach to base address

    CategoryServer Views1645
    Read More
  4. 24
    Mar 2016
    12:55

    MySQL 5.6 my.cnf 글로벌 변수인지 세션변수인지 확인

    CategoryServer Views1533
    Read More
  5. 23
    Mar 2016
    12:28

    아파치 캐시 설정 이후 잦은 아파치 자동멈춤 현상 원인분석

    CategoryServer Views2779
    Read More
  6. 23
    Mar 2016
    12:23

    APACHE PHP 에러 잡기

    CategoryServer Views9999
    Read More
  7. 18
    Mar 2016
    13:22

    서버 최적화 시키기(APACHE, PHP, MYSQL, XE 압축&캐싱&버퍼)

    CategoryServer Views6240
    Read More
  8. 17
    Mar 2016
    08:47

    아파치 모듈 mod_deflate 압축하기

    CategoryServer Views1352
    Read More
  9. 16
    Mar 2016
    12:18

    [Apache] mod_expires .htaccess을 수정하여 브라우저 캐싱하기

    CategoryServer Views1658
    Read More
  10. 08
    Mar 2016
    19:46

    윈도우 time_wait 없애기

    CategoryServer Views3920
    Read More
  11. 08
    Mar 2016
    19:40

    CSS, JS파일, gzip으로 한꺼번에 압축해서 전송하기

    CategoryServer Views1265
    Read More
  12. 07
    Mar 2016
    23:40

    PHP Opcache 적용 전과 후의 비교

    CategoryServer Views1325
    Read More
  13. 07
    Mar 2016
    23:25

    PHP Opcache 속도개선 시키기

    CategoryServer Views1833
    Read More
  14. 05
    Mar 2016
    14:48

    아파치 MPM 모드와 nginx 비교(apache 2.4 vs nginx)

    CategoryServer Views6516
    Read More
  15. 05
    Mar 2016
    09:15

    PHP 가속기

    CategoryServer Views540
    Read More
  16. 04
    Mar 2016
    09:02

    XE성능 캐시활용으로 속도 100배 개선하기(Varnish 캐시서버 + XE(+패치) + nginx(혹은 아파치) / Wincache)

    CategoryServer Views1449
    Read More
  17. 03
    Mar 2016
    17:43

    WAPM에서 Database 접속 속도 개선하기

    CategoryServer Views1224
    Read More
  18. 03
    Mar 2016
    17:27

    MySQL - 속도저하에 따른 웹페이지 접속 지연

    CategoryServer Views1302
    Read More
  19. 22
    Feb 2016
    10:42

    아파치 ab 로 성능테스트 하기

    CategoryServer Views12358
    Read More
  20. 22
    Feb 2016
    09:47

    8기가 램에 맞는 Mysql config 셋팅 값

    CategoryServer Views3859
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소