-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache_app.conf
35 lines (26 loc) · 1.01 KB
/
apache_app.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Deflate compression settings
AddOutputFilterByType DEFLATE text/plain text/xml text/html application/xhtml+xml application/xml
AddOutputFilterByType DEFLATE application/javascript application/x-javascript text/javascript
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/json
DeflateCompressionLevel 9
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
# Don't use ETags if mod_deflate is on (Apache bug)
# https://issues.apache.org/bugzilla/show_bug.cgi?id=39727
FileETag None
# Assets hosting
<Location /assets/>
# Set 360 day expiration on everything
Header set Cache-Control "max-age=31104000"
</Location>
# Custom 404 page
ErrorDocument 404 /404.html