From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Sun, 29 Dec 2013 15:13:49 +0000 Subject: Help with installing cgit In-Reply-To: <51123DD1BF2E03418A1296748DA7309274694FBB@IBWMBX02> References: <51123DD1BF2E03418A1296748DA7309274690E12@IBWMBX02> <20131229101815.GD7608@serenity.lan> <51123DD1BF2E03418A1296748DA7309274692C44@IBWMBX02> <20131229120200.GE7608@serenity.lan> <51123DD1BF2E03418A1296748DA7309274694FBB@IBWMBX02> Message-ID: <20131229151349.GF7608@serenity.lan> On Sun, Dec 29, 2013 at 02:00:56PM +0000, Shlomit Afgin wrote: > On 12/29/13 2:02 PM, "John Keeping" wrote: > > >[administrivia: please don't top post.] > > > >On Sun, Dec 29, 2013 at 10:37:00AM +0000, Shlomit Afgin wrote: > >> On 12/29/13 12:18 PM, "John Keeping" wrote: > >> > >> >On Sun, Dec 29, 2013 at 08:46:37AM +0000, Shlomit Afgin wrote: > >> >> I download from http://git.zx2c4.com/cgit/refs/ the file > >> >>cgit-0.9.2.tar.xz > >> >> I follow the instruction in README: > >> >> make get-git > >> >> make > >> >> make install > >> >> Edit Apache conf file and add > >> >> > >> >> AllowOverride None > >> >> Options +ExecCGI > >> >> Order allow,deny > >> >> Allow from all > >> >> > >> >> I also add alias: > >> >> Alias /cgit /var/www/htdocs/cgit/ > >> >> > >> >> When I go to http://server.domain/cgit I get the following error: > >> >> You don't have permission to access /cgit/ on this server > >> >> And In the error_log I get: > >> >> Directory index forbidden by Options directive: > >> >>/var/www/htdocs/cgit/ > >> >> I tried to add to 'Options' the +Indexes, So I get the list of the > >> >> content but the cgit did not work. > >> > > >> >The "cgit" program is a CGI executable that you need to run. Do you > >> >have "cgit" in /var/www/htdocs/cgit/ ? If so, what happens if you go > >>to > >> >http://your.domain/cgit/cgit ? > >> > > >> >I have the following in my Apache config for CGit: > >> > > >> > > >> > RewriteEngine on > >> > RewriteCond %{REQUEST_FILENAME} !-f > >> > RewriteRule ^/var/www/localhost/htdocs/cgit(.*) > >> >/cgi-bin/cgit.cgi$1 [L,PT] > >> > > >> > > >> >This rewrites all requests under /cgit to go to the "cgit" program in > >> >/cgi-bin/. > >> > >> I have /var/www/htdocs/cgit/cgit.cgi and when I go to > >> http://server.domain/cgit/cgit.cgi, > >> It try to open the file (and as where to save it) instead of run it. > > > >Do you have a suitable "AddHandler" directive? The link I gave below > >has a section on how to use ExecCGI and says you will need something > >like this: > > > > AddHandler cgi-script .cgi > > > >> >There is some more information on Apache's CGI support here [1]. > >> > > >> >[1] http://httpd.apache.org/docs/current/howto/cgi.html > > I'm sorry, I did not had the 'Addhandler'. > Now I get a web page, but when I click on the link I get a regular browse > of the directory in the web. > I cannot see the files exist in the repository. Sorry, I'm not an expert on configuring Apache. I recommend you read the CGI tutorial linked above thoroughly. Do you have CGit's "virtual-root" configuration turned on? It will probably be simpler to disable that.