How to prevent serving .git directory on web

Recently while working on a web based project which runs on apache2 on EC2 Linux server, PHP, MySQL, using git as a source version control system(VCS), i was able to access the .git repository from browser like¬†http://example.com/.git/ Why is it bad to keep .git folder on server and accessible on production servers? When deploying any … Continue reading How to prevent serving .git directory on web

Advertisements