You are not logged in.

#1 2014-04-09 17:47:12

johni
Member
Registered: 2012-02-03
Posts: 102

[SOLVED] Problem running cgit on Apache after Apache 2.4 update

Since the Apache 2.4 update, I cannot get cgit to work in apache anymore.

My configuration is just as the wiki article desribes.  I appended the following to the end of the httpd.conf file:

#
# cgit configuration for apache
#

ScriptAlias /cgit/ "/usr/lib/cgit/cgit.cgi/"
Alias /cgit-css "/usr/share/webapps/cgit/"
<Directory "/usr/share/webapps/cgit/">
   AllowOverride None
   Options None
   Order allow,deny
   Allow from all
</Directory>
<Directory "/usr/lib/cgit/">
   AllowOverride None
   Options ExecCGI FollowSymlinks
   Order allow,deny
   Allow from all
</Directory>

Now when I access it at http://hostname/cgit/, I get a 403 Access Forbidden

I researched a bit and found that apache 2.4 uses a differnt authorization scheme, where instead of "Order allow,deny", and "Allow from all" that I should replace them with "Require all granted".  So I changed the end of the httpd.conf to look like this:

#
# cgit configuration for apache
#

ScriptAlias /cgit/ "/usr/lib/cgit/cgit.cgi/"
Alias /cgit-css "/usr/share/webapps/cgit/"
<Directory "/usr/share/webapps/cgit/">
   AllowOverride None
   Options None
   Require all granted
</Directory>
<Directory "/usr/lib/cgit/">
   AllowOverride None
   Options ExecCGI FollowSymlinks
   Require all granted
</Directory>

But, with that change, instead of the 403 error, I get a 404 error.
I'm not an apache guru, so I am a little lost as to how to fix this. 

Note:  I started with a fresh httpd.conf from httpd.conf.pacnew

Can anyone give me some insight as to what I am doing wrong?

Last edited by johni (2014-04-09 18:56:38)

Offline

#2 2014-04-09 18:14:06

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [SOLVED] Problem running cgit on Apache after Apache 2.4 update

Check the apache logs first, is anything interesting there?. https://wiki.archlinux.org/index.php/LA … leshooting


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#3 2014-04-09 18:55:42

johni
Member
Registered: 2012-02-03
Posts: 102

Re: [SOLVED] Problem running cgit on Apache after Apache 2.4 update

I found the problem.   In apache 2.4, the default httpd.conf file had the "LoadModule cgi_module modules/mod_cgi.so" line commented out.  In apache 2.2, the default was to NOT comment it out.

I uncommented the line and restarted httpd, and now it is working.

Offline

Board footer

Powered by FluxBB