[2] | 1 | $apt-get install apache2 trac libapache2-mod-python
|
---|
| 2 |
|
---|
| 3 | Quick and dirty apache configuration
|
---|
| 4 | {{{
|
---|
| 5 | $ cat /etc/apache2/sites-enabled/000-default
|
---|
| 6 | <VirtualHost *:80>
|
---|
| 7 | ServerAdmin webmaster@grp1.netlab2009.liacs.nl
|
---|
| 8 | ServerName www.grp1.netlab2009.liacs.nl
|
---|
| 9 |
|
---|
| 10 | RewriteEngine On
|
---|
| 11 | RewriteRule ^/$ /project/grp1 [L,R]
|
---|
| 12 |
|
---|
| 13 | <Location /project>
|
---|
| 14 | SetHandler mod_python
|
---|
| 15 | PythonInterpreter main_interpreter
|
---|
| 16 | PythonHandler trac.web.modpython_frontend
|
---|
| 17 | PythonOption TracEnvParentDir /var/trac
|
---|
| 18 | PythonOption TracUriRoot /project
|
---|
| 19 | </Location>
|
---|
| 20 |
|
---|
| 21 | <LocationMatch "/project/[^/]+/login">
|
---|
| 22 | AuthType Basic
|
---|
| 23 | AuthName "Trac (netlab/netlab)"
|
---|
| 24 | AuthUserFile /var/trac/.htpasswd
|
---|
| 25 | Require valid-user
|
---|
| 26 | </LocationMatch>
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | ErrorLog /var/log/apache2/error.log
|
---|
| 30 | LogLevel warn
|
---|
| 31 | CustomLog /var/log/apache2/access.log combined
|
---|
| 32 |
|
---|
| 33 | <Location /mpinfo>
|
---|
| 34 | SetHandler mod_python
|
---|
| 35 | PythonInterpreter main_interpreter
|
---|
| 36 | PythonHandler mod_python.testhandler
|
---|
| 37 | </Location>
|
---|
| 38 |
|
---|
| 39 | Alias /doc/ "/usr/share/doc/"
|
---|
| 40 | <Directory "/usr/share/doc/">
|
---|
| 41 | Options Indexes MultiViews FollowSymLinks
|
---|
| 42 | Order allow,deny
|
---|
| 43 | Allow from all
|
---|
| 44 | </Directory>
|
---|
| 45 | </VirtualHost>
|
---|
| 46 | }}}
|
---|
| 47 |
|
---|
| 48 | #Username password file creation
|
---|
| 49 | {{{
|
---|
| 50 | $ echo "netlab" | htpasswd -b -c /var/trac/.htpasswd netlab
|
---|
| 51 | }}}
|
---|
| 52 |
|
---|
| 53 | # Trac creation
|
---|
| 54 | {{{
|
---|
| 55 | $ mkdir /var/trac
|
---|
| 56 | $ chown www-data:www-data /var/trac
|
---|
| 57 | $ sudo -u www-data trac-admin /var/trac/grp1 initenv
|
---|
| 58 | }}}
|
---|
| 59 |
|
---|
| 60 | # Change alter /var/trac/grp1/conf/trac.ini
|
---|
| 61 | {{{
|
---|
| 62 | [header_logo]
|
---|
| 63 | alt = LIACS - netlab 2009 - grp1
|
---|
| 64 | height = -1
|
---|
| 65 | link =
|
---|
| 66 | src = http://www.liacs.nl/base/images/banner.jpg
|
---|
| 67 | width = -1
|
---|
| 68 |
|
---|
| 69 | [project]
|
---|
| 70 | admin =
|
---|
| 71 | descr = My example project
|
---|
| 72 | footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a>
|
---|
| 73 | icon = common/trac.ico
|
---|
| 74 | name = Liacs netlab 2009 - group 1
|
---|
| 75 | url =
|
---|
| 76 |
|
---|
| 77 | }}}
|
---|