-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapache_snippet.conf
52 lines (36 loc) · 1.36 KB
/
apache_snippet.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
# Snippet included in each server conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
DocumentRoot /var/www/html
<Directory /var/www>
Options +FollowSymLinks -Indexes -ExecCGI -Includes -MultiViews
AllowOverride none
</Directory>
<Directory /home/archiveooo>
Require all denied
</Directory>
<Directory /home/archiveooo/archiveooo/archiveooo/>
<Files wsgi.py>
Options ExecCGI
SetHandler wsgi-script
</Files>
</Directory>
# If the file doesn't exist and is not a directory I know for sure is not wsgi...
# - static is always used
# - dockerimg and public_files are used if there's no S3 bucket configured
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule !^/(static|dockerimg|public_files) /mio.wsgi/%{REQUEST_URI} [QSA,L,PT]
# ... use the WSGI script
WSGIScriptAlias /mio.wsgi /home/archiveooo/archiveooo/archiveooo/wsgi.py
# THESE MUST GO INTO EACH SERVER CONF
#WSGIDaemonProcess archiveooowsgi python-home=/home/archiveooo/archiveooo/env/ python-path=/home/archiveooo/archiveooo/
#WSGIProcessGroup archiveooowsgi
#WSGIApplicationGroup %{GLOBAL}
# Cache as wanted for these. In case of updates, one can change the HTML inclusion
ExpiresActive On
ExpiresByType text/css "access plus 30 minutes"
ExpiresByType application/javascript "access plus 30 minutes"