-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapache.conf
49 lines (39 loc) · 1.32 KB
/
apache.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
# Apache config file to serve web.py app
# This can be left in this location and added to apache config using Include directives
# http://httpd.apache.org/docs/current/mod/core.html#include
<VirtualHost *:80>
ServerName ${TROPO_VOTING_APP_SERVER_NAME}
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 0
RewriteCond %{REQUEST_URI} !^/css
RewriteCond %{REQUEST_URI} !^/docs
RewriteCond %{REQUEST_URI} !^/js
RewriteCond %{REQUEST_URI} !^/images
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/script.py
RewriteCond %{REQUEST_URI} !^/voting.py
RewriteRule ^/(.*)$ /voting.py/$1
</IfModule>
DocumentRoot /var/www/tropo-voting-app/app
<Directory /var/www/tropo-voting-app/app>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Files voting.py>
SetHandler wsgi-script
Options ExecCGI FollowSymLinks
</Files>
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
ErrorLog ${APACHE_LOG_DIR}/error-tropo-voting-app.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>