diff --git a/nginx/common/locations.conf b/nginx/common/locations.conf index a353bb9..9bad195 100644 --- a/nginx/common/locations.conf +++ b/nginx/common/locations.conf @@ -13,6 +13,7 @@ location = /robots.txt { # Cache static files location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf)$ { add_header "Access-Control-Allow-Origin" "*"; + add_header Cache-Control "public, max-age=31536000"; access_log off; log_not_found off; expires max; diff --git a/nginx/common/php.conf b/nginx/common/php.conf index 4f70350..379ad17 100644 --- a/nginx/common/php.conf +++ b/nginx/common/php.conf @@ -10,4 +10,5 @@ location ~ \.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; + add_header Cache-Control "public, max-age=3600"; } diff --git a/nginx/common/wpfc-php.conf b/nginx/common/wpfc-php.conf index c9a2195..1f929db 100644 --- a/nginx/common/wpfc-php.conf +++ b/nginx/common/wpfc-php.conf @@ -42,4 +42,5 @@ location ~ \.php$ { fastcgi_cache_bypass $skip_cache; fastcgi_no_cache $skip_cache; fastcgi_cache WORDPRESS; -} + add_header Cache-Control "public, max-age=3600"; +} \ No newline at end of file