I
I
Ivan2017-10-31 17:34:35
git
Ivan, 2017-10-31 17:34:35

How to secure the .git folder and the files in it?

How to protect the .git folder and the files in it after uploading the site files to the hosting?
while I throw .htaccess there with deny from all

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2017-10-31
@sim3x

All executable files must be located outside the root of the site, outside the direct access of the web server
. The .git directory will be inaccessible to the user without additional web server settings.

M
Maxim Fedorov, 2017-10-31
@Maksclub

A common mistake is that the web server looks at the root of the project, and "I'm already there through htaccess ...."
In the web (Yii2, Symfony) folder, in the public (Laravel) folder and in the public_html (shared hosting) folders, there should be only an entry point (index.php), css, js and images,
the rest above or next to these folders

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question