/
opentree.conf
40 lines (33 loc) · 1.54 KB
/
opentree.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
# This file derives from the file /etc/apache2/sites-available/default
# in apache2 as installed in ubuntu 12.04.
#
# We support both HTTP and HTTPS, with two separate files in sites-available.
# This file holds only the settings unique to the HTTP VirtualHost, with all
# shared configuration included from 'apache-confog-shared'. See
# http://serverfault.com/questions/83669/apache2-with-ssl-do-i-have-to-copy-virtualhost-blocks
#
# This file should be periodically reviewed as apache versions advance and
# 'best practice' for virtual host configurations changes.
<VirtualHost *:80>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
# Restrict web2py admin pages to admin users on localhost (SSH tunnel)
# TODO: Should this apply to the HTTPS VirtualHost as well?
<Location /admin>
Require ip 127.0.0.1
</Location>
<LocationMatch ^/([^/]+)/appadmin>
Require ip 127.0.0.1
</LocationMatch>
# OPENTREE SHARED CONFIGURATION
Include /etc/apache2/opentree-shared.conf
</VirtualHost>
# See http://stackoverflow.com/questions/13216837/install-web2py-in-virtual-hosting
# and http://stackoverflow.com/questions/11991891/daemon-process-cannot-be-accessed-by-this-wsgi-application-mod-wsgi
#
# NOTE that we can only specify WSGIDaemonProcess once, so this directive has been
# retained in this file. All other WSGI directives are shared
# across both vhosts
WSGIDaemonProcess web2py user=opentree group=opentree display-name=%{GROUP}