Edgewall Software

Changes between Version 3 and Version 4 of TracDev/AlternativeFrontends


Ignore:
Timestamp:
Jul 27, 2015, 9:22:41 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/AlternativeFrontends

    v3 v4  
    33== Alternative frontend: mod_python
    44
    5 Virtualenv can be used with Apache and mod_python, but as mod_python will be a system install it will not be aware of the virtualenv without some configuration. For development this is useful as one Apache can serve various development versions in a more permanent way. This method will use the system Python, but will add the libraries from the virtualenv.
     5Virtualenv can be used with '''Apache''' and '''mod_python''', but as mod_python will be a system install, it will not be aware of the virtualenv without some configuration. For development this is useful as one Apache server can serve various development versions in a more permanent way. This method will use the system Python, but will add the libraries from the virtualenv.
    66
    7 1. Make a new frontend script that for instance can be stored in the virtualenv `bin` directory.
     7 1. Make a new frontend script that for instance can be stored in the virtualenv `bin` directory:
    88 {{{#!python
    99#myvirtualtrac.py
     
    1515from trac.web.modpython_frontend import handler
    1616}}}
    17 1. Update Apache config to use this script. Add or update options according to the default mod_python setup like for instance found in TracModPython.
     17 1. Update Apache config to use this script. Add or update options according to the default mod_python setup like for instance found in TracModPython:
    1818 {{{#!apache
    1919# Extend the path so Apache will find your script on path
     
    2626== Alternative frontend: mod_wsgi
    2727
    28 Using Apache, mod_wsgi is a very good alternative to mod_python. Setting this up follows the same pattern, but for development especially there is one major advantage: It can quite easily be set up to auto-reload on code changes.
     28With Apache, '''mod_wsgi''' is a very good alternative to '''mod_python'''. Setting this up follows the same pattern, but for development especially there is one major advantage: it can quite easily be set up to auto-reload on code changes.
    2929
    30 1. Update a default TracModWsgi setup to make a daemonised process, and as of mod_wsgi 2.0 (this setup depends on >= 2.0) there is built-in support for custom paths and similar. Example of a full `VirtualHost` configuration:
     30 1. Update a default TracModWsgi setup to make a daemonised process, and as of mod_wsgi 2.0 (this setup depends on >= 2.0) there is built-in support for custom paths and similar. Example of a full `VirtualHost` configuration:
    3131 {{{#!apache
    3232<VirtualHost *:80>
     
    6161</VirtualHost>
    6262}}}
    63 1. Go to [mod-wsgi:ReloadingSourceCode#Monitoring_For_Code_Changes ReloadingSourceCode] and save the Python script as `/path/to/my/virtualenv/bin/monitor.py`
    64 1. A basic WSGI frontend script, save as `/path/to/my/virtualenv/bin/virtualtrac.wsgi`
     63 1. Go to [mod-wsgi:ReloadingSourceCode#Monitoring_For_Code_Changes ReloadingSourceCode] and save the Python script as `/path/to/my/virtualenv/bin/monitor.py`
     64 1. A basic WSGI frontend script, save as `/path/to/my/virtualenv/bin/virtualtrac.wsgi`:
    6565 {{{#!python
    6666