|
@@ -20,26 +20,41 @@ Install `Apache` server and its [`WSGI` module](https://github.com/GrahamDumplet
|
20
|
20
|
|
21
|
21
|
### Configuration ###
|
22
|
22
|
|
23
|
|
-Create a file named `/etc/apache2/sites-available/tracim.conf` with the following content:
|
|
23
|
+Create a file named `/etc/apache2/sites-available/tracim.conf` containing:
|
24
|
24
|
|
25
|
25
|
<VirtualHost *:80>
|
26
|
26
|
ServerAdmin webmaster@tracim.mycompany.com
|
27
|
|
- ServerName tracim.mycompany.com
|
28
|
|
-
|
29
|
|
- WSGIProcessGroup tracim
|
30
|
|
- WSGIDaemonProcess tracim user=www-data group=adm threads=4 python-path=/opt/traciminstall/tg2env/lib/python3.5/site-packages
|
31
|
|
- WSGIScriptAlias / /opt/traciminstall/tracim/productionapp.wsgi
|
|
27
|
+ ServerName localhost/tracim
|
|
28
|
+
|
|
29
|
+ WSGIProcessGroup localhost/tracim
|
|
30
|
+ WSGIDaemonProcess localhost/tracim user=www-data group=www-data threads=4 python-path=/home/algooapy/Documents/dev/py/tracim/tg2env/lib/python3.5/site-packages
|
|
31
|
+ # WSGIScriptAlias / /var/www/tracim/tracim/productionapp.wsgi
|
|
32
|
+ WSGIScriptAlias /tracim /var/www/tracim/tracim/app.wsgi
|
|
33
|
+ <Directory "/var/www/tracim/tracim">
|
|
34
|
+ <Files "app.wsgi">
|
|
35
|
+ Require all granted
|
|
36
|
+ </Files>
|
|
37
|
+ </Directory>
|
32
|
38
|
|
33
|
39
|
#Serve static files directly without TurboGears
|
34
|
|
- Alias /assets /opt/traciminstall/tracim/tracim/public/assets
|
35
|
|
- Alias /favicon.ico /opt/traciminstall/tracim/tracim/public/favicon.ico
|
|
40
|
+ Alias /assets /var/www/tracim/tracim/tracim/public/assets
|
|
41
|
+ Alias /favicon.ico /var/www/tracim/tracim/tracim/public/favicon.ico
|
36
|
42
|
|
37
|
|
- CustomLog /var/log/apache2/demotracim-access.log combined
|
38
|
|
- ErrorLog /var/log/apache2/demotracim-error.log
|
|
43
|
+ CustomLog ${APACHE_LOG_DIR}/tracim_access_log combined
|
|
44
|
+ ErrorLog ${APACHE_LOG_DIR}/tracim_error_log
|
39
|
45
|
LogLevel debug
|
40
|
46
|
</VirtualHost>
|
41
|
47
|
|
|
48
|
+Enable this site configuration file:
|
|
49
|
+
|
|
50
|
+ sudo a2ensite tracim.conf
|
|
51
|
+
|
|
52
|
+Reload `Apache` configuration:
|
|
53
|
+
|
|
54
|
+ sudo systemctl reload apache2.service
|
|
55
|
+
|
42
|
56
|
## Documentation Links ##
|
43
|
57
|
|
44
|
58
|
[TurboGears](http://turbogears.readthedocs.io/en/tg2.3.7/cookbook/deploy/mod_wsgi.html)
|
|
59
|
+
|
45
|
60
|
[mod_wsgi](http://modwsgi.readthedocs.io/en/develop/index.html)
|