This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
/
django-httpd.conf
83 lines (74 loc) · 2.75 KB
/
django-httpd.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
WSGIDaemonProcess python-blogs python-home=/var/www/python-blogs/venv python-path=/var/www/python-blogs/python-blogs restart-interval=3600 request-timeout=600
WSGIProcessGroup python-blogs
WSGIScriptAlias / /var/www/python-blogs/python-blogs/gsoc/wsgi.py
<Directory /var/www/python-blogs/python-blogs/gsoc>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Alias /static /var/www/python-blogs/python-blogs/static
<Directory /var/www/python-blogs/python-blogs/static>
Require all granted
</Directory>
Alias /media /var/www/python-blogs/python-blogs/media
<Directory /var/www/python-blogs/python-blogs/media>
Require all granted
</Directory>
Alias /logs /var/www/python-blogs/python-blogs/logs
<Directory /var/www/python-blogs/python-blogs/logs>
Options +Indexes
Require all granted
</Directory>
# BEGIN Compress text files
<ifModule mod_deflate.c>
DeflateCompressionLevel 3
DeflateMemLevel 8
DeflateWindowSize 10
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</ifModule>
# END Compress text files
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/vnd.microsoft.icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
# END Expire headers
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
RequestHeader edit "If-None-Match" '^"((.*)-gzip)"$' '"$1", "$2"'
<filesMatch "\.(ico)$">
Header set Cache-Control "immutable"
</filesMatch>
<filesMatch "\.(jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css|js)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
# BEGIN Turn ETags Off
FileETag None
# END Turn ETags Off