Re: Make Gitweb behave like Apache mod_userdir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sylvain Rabot <sylvain@xxxxxxxxxxxxxx> writes:

> +If you want gitweb to act a bit like UserDir mod in apache, knowing, http://<host>/~<user> 
> +will list all git repos of <user> located in a special directory in his home (/home/<user>/gitweb/), 
> +do the following steps :
> +
> +Add this to the VirtualHost section of your apache configuration file :
> +
> +   RewriteRule ^/~([^\/]+)/?$  /cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/home/$1/gitweb/,L,PT]
> +
> +Modify your gitweb.conf file, located at /etc/gitweb.conf in this example, with :
> +
> +   $projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/path/to/the/defaul/project/root"; 
> +
> +Thus, each user with a gitweb folder in his home will be able to browse it with gitweb.
> +/!\ The gitweb folder and user's home folder must be readable by the webserver user.

Wouldn't it be a good idea to somehow make this work well together with
the --user-path feature of git-daemon?

Perhaps the recommended name given in the example shouldn't be ~/gitweb,
but more like ~/public_git, as this is like ~/public_html but for git
repositories.  Then the end users will browse

	http://my.site/~gitster/public_git/git.git

and gitweb can be told to show

	clone URL: git://my.site/~gitster/public_git/git.git

on the page.  If the site administrator runs git-daemon with --user-path
set to public_git, everything will work seamlessly, no?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]