Copy a WSGI
application script:
cp tracim/app.wsgi tracim/productionapp.wsgi
Edit this last's APP_CONFIG
variable to match your environment:
APP_CONFIG = "/var/www/tracim/tracim/production.ini"
Install Apache
server and its WSGI
module:
sudo apt install apache2 libapache2-mod-wsgi-py3
Create a file named /etc/apache2/sites-available/tracim.conf
with the following content:
<VirtualHost *:80>
ServerAdmin webmaster@tracim.mycompany.com
ServerName tracim.mycompany.com
WSGIProcessGroup tracim
WSGIDaemonProcess tracim user=www-data group=adm threads=4 python-path=/opt/traciminstall/tg2env/lib/python3.5/site-packages
WSGIScriptAlias / /opt/traciminstall/tracim/productionapp.wsgi
#Serve static files directly without TurboGears
Alias /assets /opt/traciminstall/tracim/tracim/public/assets
Alias /favicon.ico /opt/traciminstall/tracim/tracim/public/favicon.ico
CustomLog /var/log/apache2/demotracim-access.log combined
ErrorLog /var/log/apache2/demotracim-error.log
LogLevel debug
</VirtualHost>