"web root" 是什么意思?

What is meant by the term "web root"?

我已经在我的本地机器上设置了我自己的 AMP 堆栈,并且正在尝试 Web 应用程序开发。我正在研究安全应用程序开发的各种最佳实践,并且我经常看到对术语 "web root"

的引用

例如:

Make sure you store the file outside of the web root

我大概明白了,但是,我有点迷糊。考虑 OS X:

中的 WebServer 目录
/Library
|
|--WebServer
   |
   |--CGI-Executables
   |
   |--share
   |
   |--Documents
      |--index.html.en
      |--MyWebApp
         |
         |--myFile1.html
         |--myFile2.js
         |--myFile3.php

术语 似乎 表明 Web 根目录位于 MyWebApp 目录中。但是,'Documents' 下的任何内容都不可见,甚至 WebServer 下的任何内容都不可见。也许不是,因为当我删除 index.html.en 并在浏览器中导航到 localhost/ 时,我收到 403 错误。

"web root"是什么意思?

Web根目录是Web可以访问的第一个目录。通常称为/public_html。您可以将目录定义为与您网站中使用的数据(例如图像、高速缓存...)处于同一级别或更高级别的目录。