How do i fix problem with Ubuntu 11.10 server and gitweb?












1















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 -




  1. installed 'mediawiki' and working now.

  2. installed 'apache2' and working too.

  3. git is working too. i tried to clone git repo to my desktop, and success connected.

  4. installed 'gitweb' and... not working. - Internal Server Error.


  5. 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


  6. gitweb was installed to /usr/share/gitweb.



  7. 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



  8. 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 <kay.sievers@vrfy.org>, 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>



  9. /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";



  10. /etc/apache2/conf.d/gitweb



    Alias /gitweb /usr/share/gitweb

    <Directory /usr/share/gitweb>
    Option FollowSymLinks +ExecCGI
    AddHandler cgi-script .cgi
    <Directory>


  11. i excuted this command - "a2enmod cgi, a2enmod perl" and already enabled.











share|improve this question



























    1















    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 -




    1. installed 'mediawiki' and working now.

    2. installed 'apache2' and working too.

    3. git is working too. i tried to clone git repo to my desktop, and success connected.

    4. installed 'gitweb' and... not working. - Internal Server Error.


    5. 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


    6. gitweb was installed to /usr/share/gitweb.



    7. 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



    8. 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 <kay.sievers@vrfy.org>, 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>



    9. /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";



    10. /etc/apache2/conf.d/gitweb



      Alias /gitweb /usr/share/gitweb

      <Directory /usr/share/gitweb>
      Option FollowSymLinks +ExecCGI
      AddHandler cgi-script .cgi
      <Directory>


    11. i excuted this command - "a2enmod cgi, a2enmod perl" and already enabled.











    share|improve this question

























      1












      1








      1


      2






      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 -




      1. installed 'mediawiki' and working now.

      2. installed 'apache2' and working too.

      3. git is working too. i tried to clone git repo to my desktop, and success connected.

      4. installed 'gitweb' and... not working. - Internal Server Error.


      5. 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


      6. gitweb was installed to /usr/share/gitweb.



      7. 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



      8. 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 <kay.sievers@vrfy.org>, 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>



      9. /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";



      10. /etc/apache2/conf.d/gitweb



        Alias /gitweb /usr/share/gitweb

        <Directory /usr/share/gitweb>
        Option FollowSymLinks +ExecCGI
        AddHandler cgi-script .cgi
        <Directory>


      11. i excuted this command - "a2enmod cgi, a2enmod perl" and already enabled.











      share|improve this question














      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 -




      1. installed 'mediawiki' and working now.

      2. installed 'apache2' and working too.

      3. git is working too. i tried to clone git repo to my desktop, and success connected.

      4. installed 'gitweb' and... not working. - Internal Server Error.


      5. 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


      6. gitweb was installed to /usr/share/gitweb.



      7. 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



      8. 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 <kay.sievers@vrfy.org>, 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>



      9. /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";



      10. /etc/apache2/conf.d/gitweb



        Alias /gitweb /usr/share/gitweb

        <Directory /usr/share/gitweb>
        Option FollowSymLinks +ExecCGI
        AddHandler cgi-script .cgi
        <Directory>


      11. i excuted this command - "a2enmod cgi, a2enmod perl" and already enabled.








      11.10 server apache2 git






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 8 '12 at 5:33









      KrisKris

      613




      613






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Looks like apache can't execute index.cgi because it doesn't have permission. index.cgi is a symlink to gitweb.cgi, and I can see from it's permissions that only root can execute it.



          Usually Apache doesn't run as the root user, so you need to change the permissions of gitweb.cgi to allow Apache to execute it.



          Try running this command (as root) to change the permissions on gitweb.cgi



          chmod +x /usr/share/gitweb/gitweb.cgi





          share|improve this answer
























          • Thanks for reply, and i did that command... but, it donesn't too :)

            – Kris
            May 8 '12 at 8:19













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f133622%2fhow-do-i-fix-problem-with-ubuntu-11-10-server-and-gitweb%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Looks like apache can't execute index.cgi because it doesn't have permission. index.cgi is a symlink to gitweb.cgi, and I can see from it's permissions that only root can execute it.



          Usually Apache doesn't run as the root user, so you need to change the permissions of gitweb.cgi to allow Apache to execute it.



          Try running this command (as root) to change the permissions on gitweb.cgi



          chmod +x /usr/share/gitweb/gitweb.cgi





          share|improve this answer
























          • Thanks for reply, and i did that command... but, it donesn't too :)

            – Kris
            May 8 '12 at 8:19


















          0














          Looks like apache can't execute index.cgi because it doesn't have permission. index.cgi is a symlink to gitweb.cgi, and I can see from it's permissions that only root can execute it.



          Usually Apache doesn't run as the root user, so you need to change the permissions of gitweb.cgi to allow Apache to execute it.



          Try running this command (as root) to change the permissions on gitweb.cgi



          chmod +x /usr/share/gitweb/gitweb.cgi





          share|improve this answer
























          • Thanks for reply, and i did that command... but, it donesn't too :)

            – Kris
            May 8 '12 at 8:19
















          0












          0








          0







          Looks like apache can't execute index.cgi because it doesn't have permission. index.cgi is a symlink to gitweb.cgi, and I can see from it's permissions that only root can execute it.



          Usually Apache doesn't run as the root user, so you need to change the permissions of gitweb.cgi to allow Apache to execute it.



          Try running this command (as root) to change the permissions on gitweb.cgi



          chmod +x /usr/share/gitweb/gitweb.cgi





          share|improve this answer













          Looks like apache can't execute index.cgi because it doesn't have permission. index.cgi is a symlink to gitweb.cgi, and I can see from it's permissions that only root can execute it.



          Usually Apache doesn't run as the root user, so you need to change the permissions of gitweb.cgi to allow Apache to execute it.



          Try running this command (as root) to change the permissions on gitweb.cgi



          chmod +x /usr/share/gitweb/gitweb.cgi






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 8 '12 at 7:59









          tjlevinetjlevine

          188229




          188229













          • Thanks for reply, and i did that command... but, it donesn't too :)

            – Kris
            May 8 '12 at 8:19





















          • Thanks for reply, and i did that command... but, it donesn't too :)

            – Kris
            May 8 '12 at 8:19



















          Thanks for reply, and i did that command... but, it donesn't too :)

          – Kris
          May 8 '12 at 8:19







          Thanks for reply, and i did that command... but, it donesn't too :)

          – Kris
          May 8 '12 at 8:19




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f133622%2fhow-do-i-fix-problem-with-ubuntu-11-10-server-and-gitweb%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to make a Squid Proxy server?

          第一次世界大戦

          Touch on Surface Book