Changes between Version 1 and Version 2 of TracCgi


Ignore:
Timestamp:
12/24/20 01:28:07 (4 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracCgi

    v1 v2  
    1111== Apache web-server configuration
    1212
    13 In [http://httpd.apache.org/ Apache] there are two ways to run Trac as CGI:
     13In [https://httpd.apache.org/ Apache] there are two ways to run Trac as CGI:
    1414
    1515 1. Use a `ScriptAlias` directive that maps a URL to the `trac.cgi` script (recommended)
     
    4949}}}
    5050
    51 If you are using the [http://httpd.apache.org/docs/suexec.html Apache suEXEC] feature please see [trac:ApacheSuexec].
     51If you are using the [https://httpd.apache.org/docs/suexec.html Apache suEXEC] feature please see [trac:ApacheSuexec].
    5252
    5353On some systems, you ''may'' need to edit the shebang line in the `trac.cgi` file to point to your real Python installation path. On a Windows system you may need to configure Windows to know how to execute a `.cgi` file (Explorer -> Tools -> Folder Options -> File Types -> CGI).
    5454
     55=== Python Egg Cache
     56
     57The [TracInstall#egg-cache egg-cache] can be configured using an `os.environ` statement in `trac.cgi`, as shown above.
     58To do the same from the Apache configuration, use the `SetEnv` directive:
     59{{{#!apache
     60SetEnv PYTHON_EGG_CACHE /path/to/dir
     61}}}
     62
     63Put this directive next to where you set the path to the [TracEnvironment Trac environment], i.e. in the same `<Location>` block.
     64
     65{{{#!apache
     66 <Location /trac>
     67   SetEnv TRAC_ENV /path/to/projenv
     68   SetEnv PYTHON_EGG_CACHE /path/to/dir
     69 </Location>
     70}}}
     71
     72
     73
    5574=== Using WSGI
    5675
    57 You can run a [http://henry.precheur.org/python/how_to_serve_cgi WSGI handler] [http://pythonweb.org/projects/webmodules/doc/0.5.3/html_multipage/lib/example-webserver-web-wsgi-simple-cgi.html under CGI].  You can [wiki:TracModWSGI#Thetrac.wsgiscript write your own application function], or use the deployed trac.wsgi's application.
     76You can run a [http://henry.precheur.org/python/how_to_serve_cgi WSGI handler] [https://thejimmyg.github.io/pythonweb/projects/webmodules/doc/0.5.3/html_multipage/lib/example-webserver-web-wsgi-simple-cgi.html under CGI].  You can [wiki:TracModWSGI#Thetrac.wsgiscript write your own application function], or use the deployed trac.wsgi's application.
    5877
    5978== Mapping Static Resources