Przeglądaj źródła

Complements the Apache documentation

Adrien Panay 7 lat temu
rodzic
commit
ab4fa492a4
1 zmienionych plików z 23 dodań i 9 usunięć
  1. 23 9
      doc/apache.md

+ 23 - 9
doc/apache.md Wyświetl plik

@@ -1,24 +1,33 @@
1
-# Running Tracim through Apache WSGI #
1
+# Running Tracim through Apache #
2 2
 
3
-## Installation ##
3
+## Tracim WSGI application script ##
4 4
 
5
-Install `Apache` `HTTP` server and its `WSGI` module:
5
+Copy a `WSGI` application script:
6
+
7
+    cp tracim/app.wsgi tracim/productionapp.wsgi
8
+
9
+Edit this last's `APP_CONFIG` variable to match your environment:
10
+
11
+    APP_CONFIG = "/var/www/tracim/tracim/production.ini"
12
+
13
+## Apache WSGI ##
14
+
15
+### Installation ###
16
+
17
+Install `Apache` server and its [`WSGI` module](https://github.com/GrahamDumpleton/mod_wsgi):
6 18
 
7 19
     sudo apt install apache2 libapache2-mod-wsgi-py3
8 20
 
9
-## Configuration ##
21
+### Configuration ###
10 22
 
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)
23
+Create a file named `/etc/apache2/sites-available/tracim.conf` with the following content:
15 24
 
16 25
     <VirtualHost *:80>
17 26
         ServerAdmin webmaster@tracim.mycompany.com
18 27
         ServerName tracim.mycompany.com
19 28
 
20 29
         WSGIProcessGroup tracim
21
-        WSGIDaemonProcess tracim user=www-data group=adm threads=4 python-path=/opt/traciminstall/tg2env/lib/python3.2/site-packages
30
+        WSGIDaemonProcess tracim user=www-data group=adm threads=4 python-path=/opt/traciminstall/tg2env/lib/python3.5/site-packages
22 31
         WSGIScriptAlias / /opt/traciminstall/tracim/productionapp.wsgi
23 32
 
24 33
         #Serve static files directly without TurboGears
@@ -29,3 +38,8 @@ installation)
29 38
         ErrorLog /var/log/apache2/demotracim-error.log
30 39
         LogLevel debug
31 40
     </VirtualHost>
41
+
42
+## Documentation Links ##
43
+
44
+[TurboGears](http://turbogears.readthedocs.io/en/tg2.3.7/cookbook/deploy/mod_wsgi.html)
45
+[mod_wsgi](http://modwsgi.readthedocs.io/en/develop/index.html)