Skip to content

Commit 86e17a6

Browse files
committed
Add a couple of examples for running dircloud underApache vhost wsgi
Add the apache-vhost config file and the wsgi wrapper
1 parent 0707760 commit 86e17a6

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<VirtualHost *:80>
2+
3+
ServerName dircloud.example.org
4+
ServerAlias dircloud
5+
6+
ServerAdmin [email protected]
7+
AddDefaultCharset utf-8
8+
9+
WSGIDaemonProcess dircloud user=dircloud group=users processes=1 threads=5
10+
WSGIScriptAlias / /home/dircloud/www/dircloud/dircloud.wsgi
11+
12+
<Directory /home/dircloud/www/dircloud>
13+
WSGIProcessGroup dircloud
14+
WSGIApplicationGroup %{GLOBAL}
15+
Order deny,allow
16+
Allow from all
17+
</Directory>
18+
19+
</VirtualHost>

examples/apache/dircloud.wsgi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- mode: python; coding: utf-8 -*-
2+
3+
# wsgi interface example for running dircloud under Apache. Sample
4+
# code based on existing wsgi and bottle docs.
5+
6+
import sys
7+
import os
8+
9+
homedir = '/home/dircloud/www/dircloud/'
10+
sys.path = [homedir] + sys.path
11+
12+
# Change working directory so relative paths (and template lookup) work again
13+
os.chdir(homedir)
14+
15+
import bottle
16+
import dircloud
17+
18+
# ... build or import your bottle application here ...
19+
# Do NOT use bottle.run() with mod_wsgi
20+
application = bottle.default_app()

0 commit comments

Comments
 (0)