티스토리 뷰

Linux

[Linux] Apache Cache 설정

hyeonii_12 2019. 11. 6. 10:40

http 통신의 경우 /etc/httpd/conf/httpd.conf에,
https 통신의 경우 /etc/httpd/conf.d/ssl.conf에
해당 내용을 설정한다.


<filesMatch ".(html|htm|js|css)$">  
FileETag None  

Header unset ETag  
Header set Cache-Control "no-cache, no-store, must-revalidate"  
Header set Pragma "no-cache"  
Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"  


<Directory /var/www/html/contents/>  
Header Set Pragma "no-cache"  
Header Set Expires "Thu, 1 Jan 1970 00:00:00 GMT"  
Header Set Cache-Control "no-store, no-cache, must-revalidate"  
Header Unset ETag  
FileETag None

설정 후 restart 명령어로 아파치 재실행
service httpd restart

'Linux' 카테고리의 다른 글

[Redhat] 버전 확인  (0) 2020.02.03
[Linux] catalina.out 생애 관리 파일 위치  (0) 2019.12.27
[Linux] jar 파일 보기  (0) 2019.12.02
[Linux] Linux 명령어 - CMD 명령어  (0) 2019.11.28
[Linux] Java 설치  (0) 2019.11.07
댓글