I wish to serve an internet site from a git repository. Clearly, this makes upgrading the live server quite simple - and I am in a position to switch to an earlier branch basically experience new code.
What are the security issues?
Should i add any directives to apache?
Can there be any non-secuity related issues else I ought to learn about?
EDIT : See Kan's answer below - here is a directive to safeguard the .git folder as I wish to set root folder at top degree of the git repos
<Files ~ "^\.git"> Order allow,deny Deny from all </Files>
There's just one concern - the
.git folder. However the git stores it within the repo root only. Should you place your internet-uncovered folder like a subfolder from the repo, it'll work great and does not require any extra configuration. The file structure is going to be:
myProj -+ +-- .git +-- www-files ... +-- someStuff
So, there's not a problem whatsoever to reveal the
www-files from the web server.
There's a great story of utilizing the svn rather...
Unsure precisely what technology you're dealing with, however it may be that does not everything must be used for your live web server (e.g. files that will get put together lower, debug pages etc).
You might be better trading your time and effort inside a step which will instantly make your 'deploy' site from the git repo, which could then be pressed over via FTP.