* Trying to access invalid directory
@ 2021-05-13 19:39 Michael Durian
0 siblings, 0 replies; only message in thread
From: Michael Durian @ 2021-05-13 19:39 UTC (permalink / raw)
I’m seeing errors like the following appear in my log file:
[Thu May 13 12:59:33.740795 2021] [authz_core:error] [pid 67752] [client 220.127.116.11:57890] AH01630: client denied by server configuration: /ebs1/git/src, referer: https://git.boogie.com/moca/src/Handset/diff/
I think rather than trying to access /ebs1/git/src, it should be trying to access /ebs1/git/moca/src. I’m guessing there is a way I can correct this using macro substitutions, but I’m not sure what configuration value needs to be adjusted.
Here’s what I’m trying to do. I’m using apache authentication to restrict access to different git areas. Each area has its own .htpasswd. Basically, if you are trying to access /moca, you need to authenticate. The same LocationMatch block that handles the authentication defines REPO_NAME and SCANPATH environment variables that I then use in the cgitrc file. What should I adjust to keep cgit from trying to access the wrong filesystem path? Or am I thinking about this all wrong and should take a different approach completely?
Excerpts from my VirtualHost definition:
AuthName 'Git Access'
Allow from all
# Let cgit know where to search for repositories.
# This value is passed to cgitrc where it is used
# to for the scan-path variable.
SetEnv REPO_NAME moca
SetEnv SCANPATH /ebs1/git/moca
SetEnv GIT_PROJECT_ROOT /ebs1/git
"(?x)^/(.*/(HEAD | \
info/refs | \
objects/info/[^/]+ | \
# For cgit
SetEnv CGIT_CONFIG /ebs1/git/cgit/cgitrc
Require all granted
Alias /cgit.png /ebs1/git/cgit/cgit.png
Alias /cgit.css /ebs1/git/cgit/cgit.css
Alias /favicon.ico /ebs1/git/cgit/favicon.ico
ScriptAlias /moca /ebs1/git/cgit/cgit.cgi
And here’s my /ebs1/git/cgit/cgitrc
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-13 19:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 19:39 Trying to access invalid directory Michael Durian
List for cgit developers and users
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.vuxu.org/cgit
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 cgit cgit/ http://inbox.vuxu.org/cgit \
Example config snippet for mirrors.
Newsgroup available over NNTP:
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git