Re: Managing websites with git
- From
- Todd A. Jacobs <nospam@codegnome.org>
- Date
- Jan 3, 2009, 21:29 UTC
- Message-ID
- <20090103212908.GG6136@penguin.codegnome.org>
- In-Reply-To
- <fe5a74300811300830x850d81csc5cf1f9b367bac11@mail.gmail.com>
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"