mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 11:26:37 -04:00
Tweak Apache conf for caching
This commit is contained in:
parent
d7d6f60538
commit
83f762f402
2 changed files with 12 additions and 10 deletions
|
@ -10,21 +10,22 @@ UseCanonicalName on
|
||||||
LogLevel warn
|
LogLevel warn
|
||||||
AddOutputFilterByType deflate image/svg+xml
|
AddOutputFilterByType deflate image/svg+xml
|
||||||
AddType image/avif .avif
|
AddType image/avif .avif
|
||||||
|
AddType font/woff2 .woff2
|
||||||
TraceEnable off
|
TraceEnable off
|
||||||
Protocols h2 h2c http/1.1
|
Protocols h2 h2c http/1.1
|
||||||
|
|
||||||
# Set up caching directives for infrequently changed files
|
# Set up caching directives for infrequently changed files
|
||||||
ExpiresActive on
|
ExpiresActive on
|
||||||
ExpiresByType application/javascript "access plus 1 month"
|
ExpiresByType application/javascript "access plus 6 months"
|
||||||
ExpiresByType font/woff2 "access plus 1 month"
|
ExpiresByType font/woff2 "access plus 6 months"
|
||||||
ExpiresByType image/avif "access plus 1 month"
|
ExpiresByType image/avif "access plus 6 months"
|
||||||
ExpiresByType image/gif "access plus 1 month"
|
ExpiresByType image/gif "access plus 6 months"
|
||||||
ExpiresByType image/jpeg "access plus 1 month"
|
ExpiresByType image/jpeg "access plus 6 months"
|
||||||
ExpiresByType image/png "access plus 1 month"
|
ExpiresByType image/png "access plus 6 months"
|
||||||
ExpiresByType image/svg+xml "access plus 1 month"
|
ExpiresByType image/svg+xml "access plus 6 months"
|
||||||
ExpiresByType image/vnd.microsoft.icon "access plus 1 month"
|
ExpiresByType image/vnd.microsoft.icon "access plus 6 months"
|
||||||
ExpiresByType image/x-icon "access plus 1 month"
|
ExpiresByType image/x-icon "access plus 6 months"
|
||||||
ExpiresByType text/css "access plus 1 month"
|
ExpiresByType text/css "access plus 6 months"
|
||||||
|
|
||||||
# These lines are a workaround for an Apache bug that prevents mod_deflate, etags, and ExpiresByType working at the same time.
|
# These lines are a workaround for an Apache bug that prevents mod_deflate, etags, and ExpiresByType working at the same time.
|
||||||
# This is probably still broken in 18.04. See https://stackoverflow.com/questions/896974/apache-is-not-sending-304-response-if-mod-deflate-and-addoutputfilterbytype-is
|
# This is probably still broken in 18.04. See https://stackoverflow.com/questions/896974/apache-is-not-sending-304-response-if-mod-deflate-and-addoutputfilterbytype-is
|
||||||
|
|
|
@ -10,6 +10,7 @@ UseCanonicalName on
|
||||||
LogLevel warn
|
LogLevel warn
|
||||||
AddOutputFilterByType deflate image/svg+xml
|
AddOutputFilterByType deflate image/svg+xml
|
||||||
AddType image/avif .avif
|
AddType image/avif .avif
|
||||||
|
AddType font/woff2 .woff2
|
||||||
TraceEnable off
|
TraceEnable off
|
||||||
Protocols h2 h2c http/1.1
|
Protocols h2 h2c http/1.1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue