0

I'm a newbie in the bug tracking system world.

I managed to install Trac 0.12 in Windows Server 2003 and was able to serve the project using IIS through an isapi_wsgi extension using the procedure found here: http://trac.edgewall.org/wiki/TracOnWindowsIisIsapi

I installed the Trac project in c:\Trac\Project1, generated the cgi-bin and htdocs directories and placed them in c:\Trac\Project1\.

Now I want to create other projects at the same level than Project1 (c:\Trac\Project2, c:\Trac\Project3 and so on).

How can I change the trac_wsgi.py and use URLs as follows: "http://localhost/Project1", "http://localhost/Project2", and so on?

I have basic experience with IIS and no experience at all with Python.

Any help would be appreciated.

Thanks

Levon
  • 138,105
  • 33
  • 200
  • 191
Pmalta
  • 3
  • 1
  • If installation and configuration is you main focus, you'd probably be better off with a different StackExchange site. In this case I propose http://serverfault.com/. – hasienda Jun 26 '12 at 19:05

1 Answers1

0

You've chosen what seems like a good installation instruction. If I understand correctly, your answer is already in the example given there:

# Setup the virtual directories - this is a list of directories our
# extension uses - in this case only 1.

So you'll want to register multiple virtual directories by copying the example with a list of directories like so (untested):

vd1 = VirtualDirParameters(Name="Project1",
                          Description = "ISAPI-WSGI Trac",
                          ScriptMaps = sm,
                          ScriptMapUpdate = "replace"
                          )
vd2 = VirtualDirParameters(Name="Project2",
                          Description = "ISAPI-WSGI Trac",
                          ScriptMaps = sm,
                          ScriptMapUpdate = "replace"
                          )
...
params.VirtualDirs = [vd1, vd2, ...]

I don't know, if you really want to get rid of the ENV_PARENT_DIR in the path. Would it hurt to have 'http://localhost/trac/Project1' instead of 'http://localhost/Project1'? This is the common and expected layout of a multiple projects Trac installation. Just my 2ct.

hasienda
  • 2,390
  • 1
  • 13
  • 16
  • Would this mean that every time I create a new projet in Trac I would have to recompile the DLL? – Pmalta Jun 26 '12 at 18:02
  • Yes, but what's the problem with that? AFAIK Python re-compiles at launch time any updated script from source file. – hasienda Jun 26 '12 at 19:03
  • Alright. Good point. One more thing. Is there any way to change the default welcome screen when running multiple Trac projects? I would prefer using some kind of dynamic page that the one simply listing the available project. As I mentionned, I'm not particular familiar with Python. Have any suggestion? – Pmalta Jun 27 '12 at 12:34
  • Well you could use any self-made page, or your own (Genshi) template at least. See the relevant customization options in http://trac.edgewall.org/wiki/TracInterfaceCustomization#ProjectList. – hasienda Jun 28 '12 at 16:09