Skip to content

Commit

Permalink
add Cache-Control header for static files
Browse files Browse the repository at this point in the history
  • Loading branch information
megahirt committed Jun 27, 2024
1 parent 0562ae6 commit f234ab6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/base-php/000-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
Require all denied
</Directory>

#https://www.howtogeek.com/devops/how-to-configure-cache-control-headers-in-apache/
<FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|woff|woff2|webm|svg|jsonp)$">
Header set Cache-Control "max-age=63072000, public"
</FilesMatch>

# https://httpd.apache.org/docs/2.4/mod/core.html#loglevel
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
Expand Down

0 comments on commit f234ab6

Please sign in to comment.