{"thread":{"id":"43288","subject":"Re: gitweb install","startedAt":"2006-11-20T01:15:05Z","lastAt":"2006-11-20T02:29:26Z","messageCount":3,"participants":["lamikr","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"295815","messageId":"45610199.4030502@cc.jyu.fi","threadId":"43288","inReplyTo":null,"subject":"gitweb install","fromName":"lamikr","fromEmail":"lamikr@cc.jyu.fi","sentAt":"2006-11-20T01:15:05Z","receivedAt":"2006-11-20T01:15:05Z","isPatch":false,"sender":{"key":"lamikr@cc.jyu.fi","avatar":null},"body":"Hi\n\nFollowing dummyuser test case (me :-) might be usefull for improving docs.\nI have read the gitweb/README but in addition of that I find out that\nthere is really little documentation about installing gitweb\nexcept the Makefile & git-instaweb.sh itself.\n\nI would like to install gitweb to /var/run/html/gitweb directory and\nafter reading the git/INSTALL & gitweb/README\nI came to conclusion that something like following could work\n\n1) build git by changing some of the default gitweb configs as a user\n    make prefix=/usr all doc GITWEB_SITENAME='gitweb test'\nGITWEB_PROJECTROOT=/var/www/html/gitweb \n2) install git as a root after build\n    make prefix=/usr install install-doc\n3) add following to apache config\n    <VirtualHost www:80>\n        ServerName my-web-page\n        DocumentRoot /gitweb\n        RewriteEngine on\n        RewriteRule ^/(.*\\.git/(?!/?(info|objects|refs)).*)?$\n/cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n        SetEnv    GITWEB_CONFIG    /etc/gitweb.conf\n    </VirtualHost>\n4) move git repository (kernel for example) to /var/www/html/gitweb\n5) restart apache\n6) open browser to http://my-web-page/gitweb\n\nObviously something failed, as after step 2, I do not have either the\n/etc/gitweb.conf or gitweb scripts under directory /var/www/html/gitweb\n\nregards\n    Mika\n   \n\n   \n"},{"id":"297426","messageId":"ejr0gi$ea8$1@sea.gmane.org","threadId":"43288","inReplyTo":"45610199.4030502@cc.jyu.fi","subject":"Re: gitweb install","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-11-20T01:32:29Z","receivedAt":"2006-11-20T01:32:29Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"lamikr wrote:\n\n> Hi\n> \n> Following dummyuser test case (me :-) might be usefull for improving docs.\n> I have read the gitweb/README but in addition of that I find out that\n> there is really little documentation about installing gitweb\n> except the Makefile & git-instaweb.sh itself.\n> \n> I would like to install gitweb to /var/run/html/gitweb directory and\n> after reading the git/INSTALL & gitweb/README\n> I came to conclusion that something like following could work\n> \n> 1) build git by changing some of the default gitweb configs as a user\n>     make prefix=/usr all doc GITWEB_SITENAME='gitweb test' \\\n>          GITWEB_PROJECTROOT=/var/www/html/gitweb \n> 2) install git as a root after build\n>     make prefix=/usr install install-doc\n> 3) add following to apache config\n>     <VirtualHost www:80>\n>         ServerName my-web-page\n>         DocumentRoot /gitweb\n>         RewriteEngine on\n>         RewriteRule ^/(.*\\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n>         SetEnv    GITWEB_CONFIG    /etc/gitweb.conf\n>     </VirtualHost>\n> 4) move git repository (kernel for example) to /var/www/html/gitweb\nIt should be enough to symlink it, given appropriate setup.\n\n> 5) restart apache\n> 6) open browser to http://my-web-page/gitweb\n> \n> Obviously something failed, as after step 2, I do not have either the\n> /etc/gitweb.conf or gitweb scripts under directory /var/www/html/gitweb\n\nFirst, \"make install\" does not install the gitweb, as the place where\nit should be installed depends from configuration to configuration.\nBy the way, you may compile ony gitweb using \"make gitweb/gitweb.cgi\"\nwith appropriate params. So 2.1) step would be to manually copy\ngitweb.cgi and gitweb.css at least, perhaps also git-logo.png and\ngit-favicon.png.\n\nSecond, you have to set up gitweb.cgi as a CGI script, or as legacy\nmod_perl script. I have for example in /var/www/cgi-bin symlink named\ngitweb to directory with gitweb.cgi, gitweb.css etc. and in\n/var/www/perl symplink to the same place.\n\nThe CGI configuration for Apache2 is (simplest case, I'd appreciate\nbetter solutions):\n\n LoadModule cgi_module modules/mod_cgi.so\n ScriptAlias /cgi-bin/ \"/var/www/cgi-bin/\"\n <Directory \"/var/www/cgi-bin\">\n    Options Indexes FollowSymlinks ExecCGI\n    AllowOverride None\n    Order allow,deny\n    Allow from all\n </Directory>\n\nand can use for example http://localhost/cgi-bin/gitweb/gitweb.cgi\n\nThe mod_perl configuration for Apache2 is (again, I'd appreciate\npointing out better solution):\n\n # mod_perl configuration, c.f. CGI version\n #\n Alias /perl \"/var/www/perl\"\n <Directory \"/var/www/perl\">\n    SetHandler perl-script\n    PerlResponseHandler ModPerl::Registry\n    PerlOptions +ParseHeaders\n    Options Indexes FollowSymlinks +ExecCGI\n    AllowOverride None\n    Order allow,deny\n    Allow from all\n </Directory>\n\nIf you don't have conf.d/perl.conf, then you have also to add to\nyour apache config the line\n\n LoadModule perl_module modules/mod_perl.so\n\nWell, mod_perl configuration could also be in the conf.d/perl.conf file.\n\nI can use http://localhost/perl/gitweb/gitweb.cgi for mod_perl driven\ngitweb.\n\nHTH\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n\n"},{"id":"294234","messageId":"45611306.4070705@cc.jyu.fi","threadId":"43288","inReplyTo":"ejr0gi$ea8$1@sea.gmane.org","subject":"Re: gitweb install","fromName":"lamikr","fromEmail":"lamikr@cc.jyu.fi","sentAt":"2006-11-20T02:29:26Z","receivedAt":"2006-11-20T02:29:26Z","isPatch":false,"sender":{"key":"lamikr@cc.jyu.fi","avatar":null},"body":"Jakub Narebski wrote:\n> lamikr wrote:\n>\n>   \n>> Hi\n>>\n>> Following dummyuser test case (me :-) might be usefull for improving docs.\n>> I have read the gitweb/README but in addition of that I find out that\n>> there is really little documentation about installing gitweb\n>> except the Makefile & git-instaweb.sh itself.\n>>\n>> I would like to install gitweb to /var/run/html/gitweb directory and\n>> after reading the git/INSTALL & gitweb/README\n>> I came to conclusion that something like following could work\n>>\n>> 1) build git by changing some of the default gitweb configs as a user\n>>     make prefix=/usr all doc GITWEB_SITENAME='gitweb test' \\\n>>          GITWEB_PROJECTROOT=/var/www/html/gitweb \n>> 2) install git as a root after build\n>>     make prefix=/usr install install-doc\n>> 3) add following to apache config\n>>     <VirtualHost www:80>\n>>         ServerName my-web-page\n>>         DocumentRoot /gitweb\n>>         RewriteEngine on\n>>         RewriteRule ^/(.*\\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n>>         SetEnv    GITWEB_CONFIG    /etc/gitweb.conf\n>>     </VirtualHost>\n>> 4) move git repository (kernel for example) to /var/www/html/gitweb\n>>     \n> It should be enough to symlink it, given appropriate setup.\n>   \nAre people usually using symlinks to their \"real development\"\nrepositories? Or is it more common to have personal working repository\nfor example in the own home directory and then the second \"public copy\"\nfor http pages? And then configure the personal repository to push the\nchanges somehow to public one?\nThat would seem to be more secure even it rises the gap between real and\npublished changes.\n\n>> 5) restart apache\n>> 6) open browser to http://my-web-page/gitweb\n>>\n>> Obviously something failed, as after step 2, I do not have either the\n>> /etc/gitweb.conf or gitweb scripts under directory /var/www/html/gitweb\n>>     \n>\n> First, \"make install\" does not install the gitweb, as the place where\n> it should be installed depends from configuration to configuration.\n> By the way, you may compile ony gitweb using \"make gitweb/gitweb.cgi\"\n> with appropriate params. So 2.1) step would be to manually copy\n> gitweb.cgi and gitweb.css at least, perhaps also git-logo.png and\n> git-favicon.png.\n>   \nOk, I did that.\n> Second, you have to set up gitweb.cgi as a CGI script, or as legacy\n> mod_perl script. I have for example in /var/www/cgi-bin symlink named\n> gitweb to directory with gitweb.cgi, gitweb.css etc. and in\n> /var/www/perl symplink to the same place.\n>\n> The CGI configuration for Apache2 is (simplest case, I'd appreciate\n> better solutions):\n>\n>  LoadModule cgi_module modules/mod_cgi.so\n>  ScriptAlias /cgi-bin/ \"/var/www/cgi-bin/\"\n>  <Directory \"/var/www/cgi-bin\">\n>     Options Indexes FollowSymlinks ExecCGI\n>     AllowOverride None\n>     Order allow,deny\n>     Allow from all\n>  </Directory>\n>   \nThanks, it seems that in Mandriva the preferred way it to put each of\nthese to own files under webapps.d directory.\nSo I created following /etc/httpd/conf/webapps.d/gitweb.conf by using\nyour script and cgi-script examples from httpd.conf as a help and got\nthings working.\n   \n# gitweb Apache configuration file\nAlias /gitweb /var/www/gitweb\n<Directory \"/var/www/gitweb\">\n    AllowOverride All\n    Options ExecCGI FollowSymLinks SymLinksifOwnerMatch\n    Order allow,deny\n    Allow from all\n    RewriteEngine on\n    RewriteRule ^/(.*\\.git/(?!/?(info|objects|refs)).*)?$\n/cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n    SetEnv    GITWEB_CONFIG    /etc/gitweb.conf\n</Directory>\n\nIs there btw, any examples from the /etc/gitweb.conf file?\n\n"}]}