📜 ⬆️ ⬇️

Installing and configuring SVN, Apache, Trac for Windows. Part 4 — The Last. Apache and Trac

Back to: Part 3 - Trac ...


In this part:

Configure Apache to work with Trac


Use mod_python to run Trac.
  1. Create the directory C: \ usr \ local \ Apache2 \ conf \ extra \ and create the file trac-all.conf in it with the following contents:
             # Solving the problem of the appearance of .egg-cache in the list of projects
    	 PythonOption PYTHON_EGG_CACHE "C: / temp /"
    	
    	 Alias ​​/ trac / chrome / common "C: / usr / local / python / share / trac / htdocs /"
    	 <Directory "C: / usr / local / python / share / trac / htdocs /">
    	   Order allow, deny
    	   Allow from all
    	 </ Directory>
    	
    	 # the path by which projects from the browser will be available 
    	 # example http: // localhost / trac / foo-store
    	 <Location "/ trac">
    	   SetHandler mod_python
    	   PythonHandler trac.web.modpython_frontend 
    	   PythonOption TracEnvParentDir "D: / trac-projects /"
    	   PythonOption TracUriRoot / trac
    	 </ Location>
    	
    	 <LocationMatch "/ trac / [^ /] + / login">
    	   AuthType Basic
    	   AuthName "Trac projects"
    	   AuthUserFile "C: / usr / local / Apache2 / conf / svn / svnpasswd"
    	   Require valid-user
    	 </ LocationMatch>
    	
    	 # test for work mod_python
    	 <Location / mpinfo>
    	  SetHandler mod_python
    	  PythonHandler mod_python.testhandler
    	 </ Location>
    
    	
  2. change directory C: \ usr \ local \ Apache2 \ conf \
  3. open the httpd.conf file and add the following lines to the end of the file:
    	 # Trac config
    	 include conf / extra / trac-all.conf
    	
  4. save the file and close it.
  5. Restart the Apache server.

Open a browser and enter the address http: // localhost / trac / The browser will ask you for the name and password you specified earlier in the file C: \ usr \ local \ Apache2 \ conf \ svn \ svnpasswd , enter them.

You will see a page where you will see a list of available projects:
  Available Projects
   - foo-store
   - another

')

Installation completion


Everything! Works!



Source: https://habr.com/ru/post/53757/


All Articles