Yet another hgweb config question
J.S. van Bethlehem
jakobb at astro.rug.nl
Thu Nov 6 05:12:04 CST 2008
Patrick, I think I have already working what you're after, just checking
some things:
>
> For my private repo, I have setup: /home/patrick/public_html/repo
>
> with hgwebdir.cgi, and hgweb.config. But instead of putting every
> repository directory from diverse projects under this repo directory,
> I wanted to put them in "related" sub-directories so that I would only
> be looking at say:
What do you mean by this? You are quite vague here. You said you don't
want to put dirs under this directory, but in the end you _did_ put them
in dirs? Where did you do the ls-command?
>
> Now, while the "index" page (hgwebdir.cgi) shows up fine, once I put
> .htaccess in place to clean up the URL I notice two things:
>
> a) Before I could go to: localhost/~patrick/repo, but now I have to
> use the explicit URL:
> localhost/~patrick/repo/hgwebdir.cgi. (Note: I have added
> hgwebdir.cgi to the apache config)
What do you mean: 'i could go'? You mean you could open that file in the
browser? But then this is no surprise at all! You should rename
hgwebdir.cgi to index.cgi if you want to access it as
localhost/~patrick/repo.
> b) More importantly, while I can see the "index" page, when I click on
> the repository I want to view, it cannot be found. For example, if I
> want to view the dib_8800 repo, and highlight the "link" in the index
> page it shows this URL: http://localhost/repo/dib_8800, when the
> actual location is /home/patrick/public_html/repo/dib/dib_8800.
Looking at your .htaccess this makes sense. I think you put the wrong
RewriteBase in there.... i'll get back to that
>
> hgwebconfig looks like this:
>
> [collections]
> #/home/patrick/repo/dib = /home/patrick/repo/dib
> bb-ant-tools/ = bb-ant-tools/
> cbl/ = cbl/
> dib/ = dib/
> hg/ = hg/
> perldesk/ = perldesk/
> sd/ = sd/
> sdplugins/ = sdplugins/
> zencart/ = zencart/
>
> [web]
> baseurl = /repo
I'm not a expert unfortunately, but I think you need to put in pull urls
for each collection (that works definitely):
/home/patrick/repo/cbl = /home/patrick/repo/cbl
etc
The baseurl you put in [web] is not used in [collections]. This makes
sense, because the baseurl has to do with access over the net, whilst
you collections are not (they are directly read from the file system)
> while .htaccess looks like this:
>
> Options +ExecCGI
>
> RewriteEngine On
> RewriteBase /repo
> RewriteRule ^$ hgwebdir.cgi [L]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule (.*) hgwebdir.cgi/$1 [QSA,L]
I think you need to change two things:
1. RewriteBase probably has to be /~patrick/repo
2. You need to rename hgwebdir.cgi to index.cgi and replace this in the
.htaccess file as well. The webserver has _no_ reason to open this file
otherwise. (I mean: this whole Rewrite-thing will only work if you
explicitly ask for hgwebdir.cgi. index.cgi will always be opened
automatically, which answers you (a) question above)
> Now, I'm guessing that I can't do this (have the repos divided up in
> sub-directories), but if I can configure it this way, tell me how. =)
>
I'm still not sure what you mean, but my guess is that your conclusion
is wrong... you _can_do this.
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list