Subject: Re: Managing websites with git

From: "Todd A. Jacobs" <[email-masked]>
Date: Sat, 3 Jan 2009 13:29:08 -0800

On Sun, Nov 30, 2008 at 05:30:30PM +0100, Felix Andersen wrote:

> I was thinking about any security issues with the .git dir being
> hosted. Or is that even the right way to do it?

With Apache, you can add the following to your httpd.conf file, or to an
.htaccess file within your document root:

    <DirectoryMatch "^\.git">
	Order allow,deny
	Deny from all
    </DirectoryMatch>
    <FilesMatch "^\.gitignore">
	Order allow,deny
	Deny from all
    </FilesMatch>

to prevent web access to the respository.

-- 
"Oh, look: rocks!"
	-- Doctor Who, "Destiny of the Daleks"