맛집 여행 캠핑 일상 생활

아파치 mod_cache 설정 본문

LAMP

아파치 mod_cache 설정

영은파더♥ 2016. 2. 5. 16:57

아파치 mod_cache 모듈 설정하기


● mod_cache 설정

<IfModule mod_cache.c>

    <IfModule mod_disk_cache.c>

        CacheEnable disk /

        CacheRoot /var/cache/mod_cache/tmp

        CacheDirLevels 2

        CacheDirLength 1

        CacheMaxFileSize 300000

        CacheMinFileSize 1

        #CacheIgnoreCacheControl On

        CacheIgnoreNoLastMod On

        CacheIgnoreQueryString Off

        CacheIgnoreHeaders None

        CacheLastModifiedFactor 0.1

        CacheDefaultExpire 300

        CacheMaxExpire 86400

        #CacheStoreNoStore On

        #CacheStorePrivate On

    </IfModule>

</IfModule>

/var/cache/mod_cache/tmp 아파치 권한에 맞게 디렉토리를 생성 및 소유자를 변경해 주어야 한다.

chown -R apache.apache /var/cache/mod_cache

chmod 777 /var/cache/mod_cache

chmod 700 /var/cache/mod_cache/tmp


위와 같이 설정해서 서버 부하를 줄여보자. 그리고 위의 옵션들은 아파치 버전에 따라 달라질 수 있다.


Trackback : | Comments :