I have my apache host under /var/www/html and I put few small git deploy scripts into /var/www directory for simplicity. Is www a public folder? Is it safe to store scripts in there? If so, are there any risks? If not, which directory is recommended?

It is Ubuntu 14.04 server.

  • Who runs the scripts? In what circumstances? And do you care if the whole world can download them? – Michael Hampton Jul 25 '16 at 8:38
  • These scipts may show structure of apps – Kunok Jul 25 '16 at 8:45

If you configure your vhosts to use subdirectories within /var/www/html it is just as safe as to store htpasswd files in /var/www - no one using http will be able to read them.
A more common way is to bundle the scripts within a Webapps Folder, as shellscripts usually shouldnt contain sensitive information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.