Matthewl 发表于 2018-11-26 14:00:48

apache常用的配置指令:DocumentRoot

  DocumentRoot 指令
  说明 组成网络上可见的主文档树的根目录
  语法 DocumentRoot directory-path
  默认值 DocumentRoot /usr/local/apache2/htdocs
  作用域 server config, virtual host
  状态 核心(C)
  模块 core
  此指令设置了httpd伺服的目录。在没有使用类似Alias这样的指令的情况下,服务器会将请求中的URL附加到DocumentRoot后面以构成指向文档的路径。比如说:
  DocumentRoot /usr/web
  于是对http://www.my.host.com/index.html的访问就会指向/usr/web/index.html 。如果directory-path不是绝对路径,则被假定为是相对于ServerRoot的路径。
  指定DocumentRoot时不应包括最后的"/"。

页: [1]
查看完整版本: apache常用的配置指令:DocumentRoot