source: liacs/net/as2/ApacheWithTrac.txt@ 300

Last change on this file since 300 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

File size: 1.8 KB
RevLine 
[2]1$apt-get install apache2 trac libapache2-mod-python
2
3Quick 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]
63alt = LIACS - netlab 2009 - grp1
64height = -1
65link =
66src = http://www.liacs.nl/base/images/banner.jpg
67width = -1
68
69[project]
70admin =
71descr = My example project
72footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a>
73icon = common/trac.ico
74name = Liacs netlab 2009 - group 1
75url =
76
77}}}
Note: See TracBrowser for help on using the repository browser.