hgrc and hgwebdir.cgi on linux related questions
J.S. van Bethlehem
jakobb at astro.rug.nl
Fri Oct 3 11:41:20 UTC 2008
Patrick Waugh wrote:
> Hi,
>
> First, I get this message in my error log:
>
> [Fri Oct 03 05:31:41 2008] [error] [client 98.211.63.103] File does
> not exist: /var/www/hg, referer:
> http://98.211.63.103/~patrick/hg/hgweb.cgi
>
> and I am not understanding what file does not exist "/var/www/hg".
This is extremely weird. I have a setup using hwebdir.cgi as well and
have never seen such a problem. Even weirder is that you do get a
listing...... Maybe it has something to do with the redirecting you're
doing??
>
> Second, while I can see the repository list with my hgwebdir.cgi, and
> I have style=gitweb set in each repos's hgrc file, I get a very plain
> listing (ie no style at all) when I look at the served page.
Where did you put the hgrc file? (be precize! To me it was a bit
confusing that you need to write this in a .hg/hgrc file, instead of a
local .hgrc file
On my
> error logs, it shows to that the hgrc files are not being accessed due
> to the user being me (patrick) rather than say whatever user apache2
> is using.
>
oke... forget the previous remarks. That seems oke then. But it is
extremely strange that the server tries to access the files as user
patrick. AFAIK the Apache server has a seperate user apache that is used
to access files. So any files having read access to the world should be
readable (or group, if the apache user happens to be in the right group
of course) But even stranger: I suppose You actually created these
files. So when the server uses You as user, then it should definitely be
able to access these files!
> I'm using Ubuntu Hardy, and tried setting the group of those files to
> "www-data", but I really want things setup so that I don't have to
> remember to manually change a user or group name on a file when
> working as myself. In other words, how can I set things up so that I
> don't have to change the owner/group of the hgrc file?
>
I'm not sure what you are talking about here.... 'those' files? Then you
speak about 'a file' followed by the hgrc file.... confusing. Maybe
someone else understands what you mean.
> The online manual seems to lack a single section which describes all
> the hgrc/config files/locations/options. The info appears scattered
> throughout the manual. Is there a single reference for such info?
>
Not an easy accessible one, as far as I know. There has actually been a
request for it recently on the maillist (aah... that was your request I
see :P) By the way, the following may be helpful:
http://www.selenic.com/mercurial/hgrc.5.html
This is a man-page for the hgrc file. I think this is what you are
looking for. I think I found it through Google, even though it is part
of the selenic-website. It is a bit unfortunate that this page can't be
found more easily.
> BTW, while originally I was trying to get my shared server to host my
> repos, now what I do is even cooler. I setup redirection on my shared
> server to go to the repos on my local apache2 server. So, now I've
> got my "working" local copies in /home/patrick/hg, while I have
> another copy in /home/patrick/public_html/hg. Are others doing this,
> or do you just use one or the other and point apache2 appropriately?
>
Why would you want to do something that complicated?? The [paths] and
[collections] section can hold ANY path, including local ones. I have
only the script in my webfolder ~/public_html and in the hgweb.config I
just put:
/path/to/local = /path/to/local
(of course, when /path/to/local is not accessible for the server, then
this doesn't work, but from your story it seems that this is not a problem)
So all you need to do in hgweb.cgi is:
application = hgweb("/home/patrick/hg", "Patrick's HG repository")
and it should work, without all the hassle of redirections.
> Thanks, patrick
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list