Yet another hgweb config question
Patrick Waugh
ptwaugh at gmail.com
Fri Nov 7 05:50:30 CST 2008
I did get it all to work finally, and so I thought I'd share in case
others have a similar problem.
# hgweb.config
# These are directories under the 'base' /home/patrick/repo
# in each one there are related repositories
[collections]
bb-ant-tools/ = bb-ant-tools/
cbl/ = cbl/
dib/ = dib/
hg/ = hg/
perldesk/ = perldesk/
sd/ = sd/
sdplugins/ = sdplugins/
zencart/ = zencart/
[web]
baseurl = /~patrick/repo
style = coal-indexed
motd = Copyright Berrysoft Studios 2008. All rights reserved.
# .htaccess
Options +ExecCGI
RewriteEngine On
RewriteBase /~patrick/repo
RewriteRule ^$ hgwebdir.cgi [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) hgwebdir.cgi/$1 [QSA,L]
# /etc/apache2/httpd.conf
ServerName localhost
UseCanonicalName On
<Directory "/home/*/public_html">
DirectoryIndex hgwebdir.cgi index.html index.htm index.cgi index.pl
index.php index.xhtml
AddHandler cgi-script .cgi
Options All +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order Allow,Deny
Allow from localhost
Allow from 192.168.1.
Allow from 98.211.63.103
</Directory>
TraceEnable Off
# end of files
The above configuration allows hgwebdir.cgi to not have to be renamed
to index.cgi, as well as gets rid of it in friendly URL's.
Basically, one can get to the index like this:
http://localhost/~patrick/repo
and then get clean URL's like this:
http://localhost/~patrick/repo/cb-dev
Would be really cool if (without having to setup separate .cgi files)
we could have like a 'Meta-index' where you would have a list of
'Projects' and then get an index of only that project's repos (like
dev, stable, etc.).
The advantage would be that you wouldn't have to look through a long
list of unrelated repositories to find the one you want to drill into.
Thanks J.S. for the baseurl = /~patrick/repo part!
Patrick
More information about the Mercurial
mailing list