아마존 AWS를 모든 호스팅에 처음 사용하고 브라우저 캐싱을 돕기 위해 아래에 평소 코드를 업로드했습니다. GT Metrix 및 Google Page speed와 같은 도구는 그렇지 않습니다. 그것이 작동하는 것을 보는 것.아마존 EC2에서 브라우저 캐싱을 활용하십시오.
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
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 year"
ExpiresDefault "access plus 2 days"
</IfModule>
아무 생각없이 작동하려면이 기능을 사용하려면 무엇이 필요합니까?
미리 감사드립니다.
AWS EC2 그냥 일반 가상 서버입니다. EC2에서 애플리케이션을 직접 호스팅하는 경우 다른 호스팅에서와 마찬가지로 캐싱을 구성해야합니다. 그러나 캐싱을 위해 EC2의 앞면에 AWS Cloudfront를 사용한다면 제대로 구성해야합니다. – Ashan
동일한 운명을 겪고있는이 문제에 대한 해결책 – pee2pee
아 예! 내 솔루션을 지금 추가하십시오 –