Changes between Version 1 and Version 2 of TracMultipleProjects


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

Cosmetic changes, tagged as multi-projects

Legend:

Unmodified
Added
Removed
Modified
  • TracMultipleProjects

    v1 v2  
    1 = Configure Apache for multiple projects =
     1= Configure Apache for multiple projects
    22
    3 By following these instructions, you will set up Apache to automatically serve multiple Trac projects for you.
     3These instructions allow you to set up Apache to automatically serve multiple Trac projects for you.
    44
    5 Start out by creating a project directory in your documentroot (/var/www in this example). Projects will be accessed as http://hostname/projects/projectname. Copy (or symlink) trac.cgi to this directory together with a file named index.html. This will be shown when users try to access nonexistent projects.
     5Start by creating a project directory in your document root (`/var/www` in this example). Projects will be accessed as `http://hostname/projects/projectname`.
    66
    7 Then create your trac projects with trac-admin. It's important that they are all placed in the same directory. In this example we'll use /var/lib/trac. Add to your Apache configuration:
     7Copy (or symlink) `trac.cgi` to this directory together with a file named index.html. This will be shown when users try to access nonexistent projects.
    88
    9 {{{
     9Then create your trac projects with trac-admin. It is important that they are all placed in the same directory. In this example we will use `/var/lib/trac`. Add the following to your Apache configuration:
     10
     11{{{#!apache
    1012RewriteEngine on
    1113RewriteRule ^/projects/+$                       /projects/index.html [L]
     
    3436{{{LoadModule rewrite_module modules/mod_rewrite.so}}}
    3537
    36 Now, when you add another project, you don't need to edit any apache config. The only file you may want to edit is index.html to make it list the new project. If you think this is too much work, replace it with a python cgi script that does it for you.
     38Now, when you add another project, you don't need to edit any Apache config. The only file you may want to edit is index.html to make it list the new project. If you think this is too much work, replace it with a Python cgi script that does it for you.
    3739
    3840[wiki:TracStandalone tracd] and TracModPython can also serve multiple projects.