You are not logged in.

#1 2011-11-03 08:30:51

imbob
Member
Registered: 2011-10-22
Posts: 9

[SOLVED] Apache 403 with Gitweb

So I have followed these instructions: https://wiki.archlinux.org/index.php/Gitweb

and everytime I try to access <server/gitweb>, I get a 403 error. I have made other test folders/files and I can access those fine. I have chmod 755 any folder that I think could be causing this with no luck.

If I go into "/srv/http/gitweb", I can see the git repos in that folder which are linked to "/home/test"

Here are my settings:

/etc/conf.d/gitweb.conf:

$git_temp =  "/temp";
$projectroot = "/home/test";
our @git_base_Url_list = qw(git://...... http://git@.....)

/etc/httpd/conf/httpd.conf

<Directory "/srv/http/gitweb">
   DirectoryIndex gitweb.cgi
   Allow from all
   AllowOverride all
   Order allow,deny
   Options ExecCGI
   <Files gitweb.cgi>
   SetHandler cgi-script
   </Files>
   SetEnv  GITWEB_CONFIG  /etc/conf.d/gitweb.conf
</Directory>

the did:

ln -s /usr/share/gitweb /srv/http/gitweb
/etc/rc.d/httpd restart

I had it all working before I uninstalled XAMPP and then I installed apache and company.

I also installed Gitolite, but I am not pointing gitweb to its directory, so I can narrow down the problem.

Thanks

Last edited by imbob (2011-11-04 05:15:43)

Offline

#2 2011-11-03 14:24:39

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Apache 403 with Gitweb

403 is permission denied, so somewhere you are not allowing the httpd user to access the needed files, or have a disalow set in your apache setup


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2011-11-03 22:27:51

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Apache 403 with Gitweb

I'd almost bet that /home/test/ doesn't have execute permissions for "Other" users...?

Offline

#4 2011-11-04 04:37:30

imbob
Member
Registered: 2011-10-22
Posts: 9

Re: [SOLVED] Apache 403 with Gitweb

fukawi2 wrote:

I'd almost bet that /home/test/ doesn't have execute permissions for "Other" users...?

 chmod ugo+x /home/test

- no luck, still 403

If I take a look at the Apache log, it says:

 Directory index forbidden by Options directive: /srv/http/gitweb/ ...

so I added this under my `/srv/http/gitweb` <directory> placeholder in httpd.conf

Options All ExecCGI FollowSymLinks Includes Indexes

and now I am allowed access. Only problem  is, no gitweb interface. I am able to browse all of the repos with no interface.

I am thinking that maybe the git-daemon is not running

 /etc/rc.d/git-daemon start  ===> [FAIL] 

This is misleading...it fails because it is already running.

[SOLVED] Well, I reinstalled GIT and did a reboot and now it works as intended. I also deleted what I added in httpd.conf

Last edited by imbob (2011-11-04 05:18:00)

Offline

#5 2011-11-07 05:11:58

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Apache 403 with Gitweb

imbob wrote:
 chmod ugo+x /home/test

- no luck, still 403

Well I did say I'd almost bet tongue

imbob wrote:

If I take a look at the Apache log, it says:

 Directory index forbidden by Options directive: /srv/http/gitweb/ ...

I know it's solved now, but FWIW, what you needed to do was add a 'DirectoryIndex' configuration. This is what I need to make mine work:

	SetEnv GITWEB_CONFIG /etc/gitweb.conf
	<Directory /etc/httpd/sites/git.xxxxxx.com.au>
		Options +ExecCGI
		AddHandler cgi-script .cgi
		DirectoryIndex gitweb.cgi
	</Directory>

Offline

Board footer

Powered by FluxBB