Where to securely place files needed by PHP in Linux filesystem (according to FHS) [closed]

StackOverflow https://stackoverflow.com/questions/10986950

  •  13-06-2021
  •  | 
  •  

Вопрос

I have a PHP script running on my LAMP server that requires certain files in order to produce HTML content. The script is publicly accessible (i.e. http://example.com/script.php) but the files required by the script must secured. I could probably place the files in any directory other than /var/www and they would be relatively safe, but I'm trying to learn the Linux filesystem and I'd like to use the most appropriate place (according to FHS). Any help would be great.

Это было полезно?

Решение

After a bit of research, I think I've answered my question. The most appropriate location seems to be /srv (with the addition of sub-directories which properly categorize the data).

/srv contains site-specific data which is served by this system.

http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top