2 # General setup for the virtual host
3 ServerName lab.mitty.jp
7 ErrorLog "|/usr/sbin/rotatelogs /var/log/apache2/ssl/error_lab_%Y%m%d_log 86400 540"
8 CustomLog "|/usr/sbin/rotatelogs /var/log/apache2/ssl/access_lab_%Y%m%d_log 86400 540" combined
11 SSLCertificateFile "/path/to/ssl/server.crt"
12 SSLCertificateKeyFile "/path/to/ssl/server.key"
14 BrowserMatch "MSIE [2-6]" \
15 nokeepalive ssl-unclean-shutdown \
16 downgrade-1.0 force-response-1.0
17 # MSIE 7 and newer should be able to use keepalive
18 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
20 DocumentRoot "/var/www/lab"
23 Options FollowSymLinks
28 <Directory /var/www/lab>
35 # Alias for project independent contents
40 Alias /static/trac /var/www/trac
41 Alias /static/svn /home/tools/www/svn
42 Alias /static/htdocs /home/tools/trac/htdocs
45 RedirectMatch ^/svn$ /svn/
47 # Requests for a collection must have a trailing slash on the URI.
49 SVNParentPath /var/svn/lab
51 SVNIndexXSLT "/static/svn/svnindex.xsl"
52 <LimitExcept GET PROPFIND OPTIONS REPORT>
54 AuthName "Authentication for lab.mitty.jp"
55 AuthUserFile /home/tools/passwd/htpasswd.lab
56 AuthzSVNAccessFile /home/tools/passwd/svn-authz.lab
64 ScriptAlias /trac /home/tools/trac/cgi-bin/trac.fcgi
65 FcgidInitialEnv PYTHON_EGG_CACHE "/tmp"
66 FcgidInitialEnv TRAC_ENV_PARENT_DIR "/var/trac/lab"
68 # increase fcgi timeout value to wait slow cgi exec
74 AuthName "Authentication for lab.mitty.jp"
75 AuthUserFile /home/tools/passwd/htpasswd.lab
81 <LocationMatch /trac/[^/]+/login>
85 ## Trac query redirect
87 RewriteCond %{REQUEST_METHOD} POST
88 RewriteRule ^/trac/([^/]+)/query$ - [L]
90 RewriteCond %{QUERY_STRING} ^$
91 RewriteCond %{HTTP_COOKIE} !trac_auth=
92 RewriteRule ^/trac/([^/]+)/query$ /trac/$1/query?status=!&group=component [R,L]
94 RewriteCond %{QUERY_STRING} ^$
95 RewriteCond %{HTTP_COOKIE} trac_auth=
96 RewriteRule ^/trac/([^/]+)/query$ /trac/$1/query?status=!closed&group=component [R,L]