Edgewall Software
Modify

Ticket #290 (closed enhancement: worksforme)

Opened 8 years ago

Last modified 7 years ago

Simplified Multiple Project setup.

Reported by: anonymous Owned by: jonas
Priority: high Milestone:
Component: general Version: 0.6.1
Severity: normal Keywords:
Cc:
Release Notes:
API Changes:

Description (last modified by daniel) (diff)

I had to do some fancy rewrites and such to get trac to work on multiple projects without a bunch of hassle.

URLS are http://ip/projects/PROJECT NAME.

My trac.conf for apache It allows me to use the same trac.cgi to run all the projects.
the projects.php just does a simple dir of my svn directory and pulls all the project names and links them.

This way if someone goes to http://ip/projects/ they get a list of projects they can go to.

The last trick would be to somehow automate/get rid of the specific project area so as long as there is a proper database file in the correct location you can load a project without having to edit and restart apache.

Alias /trac/ "/usr/share/trac/htdocs/"
RewriteEngine? on
Rewriterule /projects/(.*)/ - [L]
Rewriterule
/projects/ /var/www/html/trac/projects.php
<Directory /var/www/html/trac/>
AllowOverride? None
Options +ExecCGI FollowSymLinks?
Order allow,deny
Allow from all
</Directory>
AddHandler? cgi-script cgi
## CYBERLOT PROJECT ##
Alias /projects/cyberlot "/var/www/html/trac/"
<Location "/projects/cyberlot/trac.cgi">

SetEnv TRAC_DB "/usr/share/trac/cyberlot.db"

</Location>
<Location "/projects/cyberlot/trac.cgi/login">

AuthType? Basic
AuthName? "Cyberlot"
AuthUserFile? /svn/config/passfile
Require valid-user

</Location>

Attachments

projectportal.zip (47.3 KB) - added by StefanW@… 7 years ago.
php-web-gui for adding users, projects, editing trac-permissions

Download all attachments as: .zip

Change History

comment:1 Changed 8 years ago by anonymous

Couple things that can be done to fix this.

  1. REGEX Based URL Loading.. For example

http://projects.text.com/testing/trac.cgi REGEX out the testing, load DB testing.db

  1. Add project setting to the permissions. This way you can define your http authentication/password setup once for all projects and define per project permissions using trac-admin.

Add both of these into the system and you no longer need to edit httpd.conf to add a project. If I knew python I would do it ;)

comment:2 Changed 8 years ago by anonymous

  • Priority changed from normal to high
  • Severity changed from normal to enhancement

comment:3 Changed 8 years ago by track@…

Added a page to the wiki that might help you: TracMultipleProjects

Changed 7 years ago by StefanW@…

php-web-gui for adding users, projects, editing trac-permissions

comment:4 Changed 7 years ago by StefanW@…

Sorry, binary file attachements does not work perfect in trac.
So here is the link to it on my private server:
http://www.whylee.at/opensource/projectportal.zip

(please don't kill my internet connection on whylee.at)
This is a web-gui written in php for adding users, projects, editing trac-permissions. I released it under GPL.
If you can use it, fine. If you modify it and you think everone could use your modification, please send your modifications to me. ( whylee@… )

Geetings,

Weilhartner Stefan, 4ahead

comment:5 Changed 7 years ago by daniel

  • Description modified (diff)
  • Resolution set to worksforme
  • Status changed from new to closed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.