Hi and sorry for bad english first :(...
i have one ubuntu 11.10 server and i wanna make gitweb server. i refered to this site - http://www.snowfrog.net/2011/08/02/setting-up-gitweb-on-your-ubuntu-workstation/.
so, i tried to install gitweb and restart apache server.
(as root account)
$ apt-get install gitweb
$ service apache2 restart
and i tried to connect my gitweb server, but i can't connect - Internal Server Error. i was searching for a lot of time and tried to solve this problem, i coudn't.
this is my gitweb and my server infomation -
- installed 'mediawiki' and working now.
- installed 'apache2' and working too.
- git is working too. i tried to clone git repo to my desktop, and success connected.
- installed 'gitweb' and... not working. - Internal Server Error.
i checked my apache2 log.
[error] [client ---.---.---.---] (13)Permission denied: exec of '/usr/share/gitweb/index.cgi' failed [error] [client ---.---.---.---] Premature end of script headers: index.cgi
gitweb was installed to /usr/share/gitweb.
this is permission for /usr/share/gitweb forlder.
-rwxr-xr-- 1 root root 221331 2012-05-08 02:24 gitweb.cgi lrwxrwxrwx 1 root root 10 2011-06-11 18:17 index.cgi -> gitweb.cgi drwxrwxrwx 2 root root 4096 2012-05-07 19:36 static
this is result to 'perl /usr/share/index.cgi'.
Status: 404 Not Found^M Content-Type: text/html; charset=utf-8^M ^M <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <!-- git web interface version 1.7.5.4, (C) 2005-2006, Kay Sievers <[email protected]>, Christian Gierke --> <!-- git core binaries version 1.7.5.4 --> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name="generator" content="gitweb/1.7.5.4 git/1.7.5.4"/> <meta name="robots" content="index, nofollow"/> <title>Untitled Git</title> <link rel="stylesheet" type="text/css" href="static/gitweb.css"/> <link rel="shortcut icon" href="static/git-favicon.png" type="image/png" /> </head> <body> <div class="page_header"> <a title="git homepage" href="http://git-scm.com/"><img class="logo" height="27" src="static/git-logo.png" alt="git" width="72" /></a><a href="/">projects</a> / </div> <div class="page_body"> <br /><br /> 404 - No projects found <br /> </div> <div class="page_footer"> <a class="rss_logo" href="?a=opml">OPML</a> <a class="rss_logo" href="?a=project_index">TXT</a> </div> <script type="text/javascript" src="static/gitweb.js"></script> </body> </html>
/etc/gitweb.conf
# path to git projects (<project>.git) $projectroot = "/home/git/repositories"; # directory to use for temp files $git_temp = "/tmp"; # target of the home link on top of all pages #$home_link = $my_uri || "/"; # html text to include at home page #$home_text = "indextext.html"; # file with project list; by default, simply scan the projectroot dir. $projects_list = "/home/git/projects.list"; # stylesheet to use @stylesheets = ("static/gitweb.css"); # javascript code for gitweb $javascript = "static/gitweb.js"; # logo to use $logo = "static/git-logo.png";
/etc/apache2/conf.d/gitweb
Alias /gitweb /usr/share/gitweb <Directory /usr/share/gitweb> Option FollowSymLinks +ExecCGI AddHandler cgi-script .cgi <Directory>
i excuted this command - "a2enmod cgi, a2enmod perl" and already enabled.