• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Deny access to .git/config (and other existing Files)

futureweb

Regular Pleskian
Hey there,

lately there was an Articel labeled "Massive security problems due to open Git repositories" (Google Translate)
I tried to open some .git/ExistingFile Files on Plesk Hostings on our Servers ... and guess what - all are openly accessible ... (i.e.: https://www.domain.tld/.git/config)

Can we Server-Wide disable accessing Files within .git Directory?
On our non-Plesk Servers I normally got

Code:
<DirectoryMatch "^/.*/\.git/">
  Require all denied
</DirectoryMatch>

in Apache Config ... but what's the "Best Practice approach" on Plesk Servers on this?

thx
Andreas
 
Last edited:
I wonder why do you have a .git folder in your domain public folder ?

Best practice for the past 10 years or so [for PHP apps at least] is to keep /vendor folder and other important folders and files outside public folder
 
I wonder why do you have a .git folder in your domain public folder ?

Not quite an answer to the question, but well ... we are a Hosting Provider with several Plesk Servers hosting thousands of Customers, we can't control what and where our Customers store their Data on their Hostings (or force them using Plesk GIT Features ...) - but always trying to minimize potential targets on our Servers / trying to keep our customers as safe as possible ...
 
Last edited:
Well, ok then

This remind me of the same situation related to .svn folders years ago
and the solution was the same:
in global Apache config deny all for any .svn folders
 
Back
Top