List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: Help with installing cgit
Date: Sun, 29 Dec 2013 10:18:15 +0000	[thread overview]
Message-ID: <20131229101815.GD7608@serenity.lan> (raw)
In-Reply-To: <51123DD1BF2E03418A1296748DA7309274690E12@IBWMBX02>

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
>         <Directory "/var/www/htdocs/cgit/">
>           AllowOverride None
>           Options +ExecCGI
>           Order allow,deny
>           Allow from all
>         </Directory>
>      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:

    <Location /cgit>
            RewriteEngine on
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^/var/www/localhost/htdocs/cgit(.*) /cgi-bin/cgit.cgi$1 [L,PT]
    </Location>

This rewrites all requests under /cgit to go to the "cgit" program in
/cgi-bin/.

There is some more information on Apache's CGI support here [1].

[1] http://httpd.apache.org/docs/current/howto/cgi.html

> Also I did not find instruction, how to set the file cgit.conf in
> order to change the place of cgit files location.

You can either specify CGIT_CONFIG in the environment under which CGit
runs (e.g. using Apache's "SetEnv" directive) or just change the default
when you build CGit by setting CGIT_CONFIG in the "cgit.conf" file
that's included by the makefile.


Hope this helps,
John


  reply	other threads:[~2013-12-29 10:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-29  8:46 shlomit.afgin
2013-12-29 10:18 ` john [this message]
2013-12-29 10:37   ` shlomit.afgin
2013-12-29 12:02     ` john
2013-12-29 14:00       ` shlomit.afgin
2013-12-29 15:13         ` john
2013-12-30  6:36           ` shlomit.afgin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131229101815.GD7608@serenity.lan \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).