All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: gitweb: (potential) problems with new installation
Date: Mon, 05 Mar 2012 19:39:48 +0000	[thread overview]
Message-ID: <4F551684.8020701@ramsay1.demon.co.uk> (raw)
In-Reply-To: <201203030055.34912.jnareb@gmail.com>

Jakub Narebski wrote:
> Do you use CGI (mod_cgi or mod_cgid), or mod_perl?

mod_cgid although mod_perl is also available (and *is* used by git-instaweb).

>>> You can move to using "AddHandler cgi-script .cgi" instead.
>> I remember having tried that as well - without success.
> 
> This must be done _instead_ of ScriptAlias directive and/or ExecCGI option.

Indeed :-D

I had another quick look at this and (I now remember) the AddHandler approach
actually *did* work. However, I already had some other (perl, shell) scripts
in cgi-bin and would have had to add file extensions ('.pl' or '.sh') in order
for them to keep working.

The relevant part of httpd.conf looks like this:

<Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
        # This directive allows us to have apache2's default start page
        # in /apache2-default/, but still have / go to the right place
        #RedirectMatch ^/$ /apache2-default/
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
       Options +ExecCGI
</Directory>
<Directory "/var/www/cgi-bin/static">
       Options -ExecCGI
</Directory>

#<Directory "/var/www/cgi-bin">
#        Options +ExecCGI
#        AddHandler cgi-script .cgi .pl .sh
#</Directory>

Note that the "/var/www/cgi-bin/static" directory entry *should* have solved
the problem, but it does not make any difference at all!

BTW, the error.log entries look like:

[Sun Mar 04 15:06:03 2012] [error] (13)Permission denied: exec of '/var/www/cgi-bin/static/gitweb.css' failed
[Sun Mar 04 15:06:03 2012] [error] [client 127.0.0.1] Premature end of script headers: gitweb.css, referer: http://localhost/cgi-bin/gitweb.cgi

with similar entries for git-logo.png and gitweb.js. The access log show
"500 Internal Server error" responses for gitweb.css, git-logo.png and gitweb.js.

Maybe I should re-visit the decision and swap over to using the AddHadler
approach - adding file extensions is not that hard! ;-)

Anyway, the above should work as-is, and I'm somewhat puzzled that it doesn't.
However, as I said before, it's not a gitweb fault.

>>> Could you at minimum check for JavaScript errors using JavaScript Console
>>> (clearing it and reloading gitweb page if needed)?  Please provide line
>>> where error is with a bit of context (around 3 lines).
>> I don't have a JavaScript Console. (I suppose that is an add-on? Hmm, I don't
>> have internet access from Linux... ).
> 
> JavaScript Console is built in, though there are plugins like Console^2
> that extend it.
> 
> In Mozilla 1.7.12 it is "Tools > Web Development > JavaScript Console"
> It is "Tools > Errors Console" or "Tools > Web Console" in modern Firefox.

Ah, OK. I thought you meant something other than the "Error Console".
In that case, *no* javascript errors appear in the error console.

ATB,
Ramsay Jones

      reply	other threads:[~2012-03-05 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 17:25 gitweb: (potential) problems with new installation Jakub Narebski
2012-03-02 19:35 ` Ramsay Jones
2012-03-02 23:55   ` Jakub Narebski
2012-03-05 19:39     ` Ramsay Jones [this message]

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=4F551684.8020701@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1.demon.co.uk \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.