|
@@ -1,31 +1,52 @@
|
1
|
|
-# Running Tracim through Apache WSGI #
|
|
1
|
+# Running Tracim through Apache #
|
2
|
2
|
|
3
|
|
-## Installation ##
|
|
3
|
+### Installation ###
|
4
|
4
|
|
5
|
|
-Install `Apache` `HTTP` server and its `WSGI` module:
|
|
5
|
+Install `Apache` server and its [`WSGI` module](https://github.com/GrahamDumpleton/mod_wsgi):
|
6
|
6
|
|
7
|
7
|
sudo apt install apache2 libapache2-mod-wsgi-py3
|
8
|
8
|
|
9
|
|
-## Configuration ##
|
|
9
|
+### Configuration ###
|
10
|
10
|
|
11
|
|
-Example of `Apache` `WSGI` configuration. This configuration refers to
|
12
|
|
-`productionapp.wsgi` which is a copy of the file `app.wsgi` available in the
|
13
|
|
-repo. (this file has to be updated to match with your environment and
|
14
|
|
-installation)
|
|
11
|
+Create a file named `/etc/apache2/sites-available/tracim.conf` containing:
|
15
|
12
|
|
16
|
|
- <VirtualHost *:80>
|
17
|
|
- ServerAdmin webmaster@tracim.mycompany.com
|
18
|
|
- ServerName tracim.mycompany.com
|
|
13
|
+ Listen 8080
|
19
|
14
|
|
|
15
|
+ <VirtualHost *:8080>
|
|
16
|
+ ServerName tracim
|
|
17
|
+
|
|
18
|
+ # Serve Tracim through WSGI
|
|
19
|
+ WSGIDaemonProcess tracim user=[your_user] group=[your_user] threads=4 python-home=[tracim_path]/tg2env python-path=[tracim_path]/tracim lang='C.UTF-8' locale='C.UTF-8'
|
20
|
20
|
WSGIProcessGroup tracim
|
21
|
|
- WSGIDaemonProcess tracim user=www-data group=adm threads=4 python-path=/opt/traciminstall/tg2env/lib/python3.2/site-packages
|
22
|
|
- WSGIScriptAlias / /opt/traciminstall/tracim/productionapp.wsgi
|
|
21
|
+ WSGIScriptAlias / [tracim_path]/tracim/app.wsgi process-group=tracim
|
|
22
|
+ <Directory "[tracim_path]/tracim">
|
|
23
|
+ <Files "app.wsgi">
|
|
24
|
+ Require all granted
|
|
25
|
+ </Files>
|
|
26
|
+ </Directory>
|
|
27
|
+
|
|
28
|
+ # Serve static files directly
|
|
29
|
+ Alias /assets [tracim_path]/tracim/tracim/public/assets
|
|
30
|
+ Alias /_caldavzap [tracim_path]/tracim/tracim/public/_caldavzap
|
|
31
|
+ Alias /favicon.ico [tracim_path]/tracim/tracim/public/favicon.ico
|
|
32
|
+ <Directory "[tracim_path]/tracim/tracim/public">
|
|
33
|
+ Require all granted
|
|
34
|
+ </Directory>
|
|
35
|
+ </VirtualHost>
|
23
|
36
|
|
24
|
|
- #Serve static files directly without TurboGears
|
25
|
|
- Alias /assets /opt/traciminstall/tracim/tracim/public/assets
|
26
|
|
- Alias /favicon.ico /opt/traciminstall/tracim/tracim/public/favicon.ico
|
|
37
|
+Replace `[tracim_path]` and `[your_user]` by your tracim installation path and your user.
|
27
|
38
|
|
28
|
|
- CustomLog /var/log/apache2/demotracim-access.log combined
|
29
|
|
- ErrorLog /var/log/apache2/demotracim-error.log
|
30
|
|
- LogLevel debug
|
31
|
|
- </VirtualHost>
|
|
39
|
+Load needed proxy modules and enable this site configuration file:
|
|
40
|
+
|
|
41
|
+ sudo a2enmod proxy proxy_http
|
|
42
|
+ sudo a2ensite tracim.conf
|
|
43
|
+
|
|
44
|
+Reload `Apache` configuration:
|
|
45
|
+
|
|
46
|
+ sudo systemctl reload apache2.service
|
|
47
|
+
|
|
48
|
+## Documentation Links ##
|
|
49
|
+
|
|
50
|
+[TurboGears](http://turbogears.readthedocs.io/en/tg2.3.7/cookbook/deploy/mod_wsgi.html)
|
|
51
|
+
|
|
52
|
+[mod_wsgi](http://modwsgi.readthedocs.io/en/develop/index.html)
|