Apache Reference Manual (4)_PHP教程
程序员文章站
2022-05-28 17:05:57
...
Syntax:
Context: server config, virtual host
Status: Core.
Compatibility: Available in Apache 1.3 and later
would match directories in /www/ that consisted of three numbers.
See Also:
See also: How Directory, Location and Files sections work for an explanation of how these different sections are combined when a request is received
--------------------------------------------------------------------------------
DocumentRoot directive
Syntax: DocumentRoot directory-filename
Default: DocumentRoot /usr/local/apache/htdocs
Context: server config, virtual host
Status: core
This directive sets the directory from which httpd will serve files. Unless matched by a directive like Alias, the server appends the path from the requested URL to the document root to make the path to the document. Example:
DocumentRoot /usr/web
then an access to http://www.my.host.com/index.html refers to /usr/web/index.html.
There appears to be a bug in mod_dir which causes problems when the DocumentRoot has a trailing slash (i.e., "DocumentRoot /usr/web/") so please avoid that.
--------------------------------------------------------------------------------
ErrorDocument directive
Syntax: ErrorDocument error-code document
Context: server config, virtual host, directory, .htaccess
Status: core
Override: FileInfo
Compatibility: The directory and .htaccess contexts are only available in Apache 1.1 and later.
上一篇: php基本函数汇总,php函数汇总
下一篇: php 模拟用户自动在qq空间发表文章
推荐阅读
-
CentOS7+apache+php7+mysql5.7配置教程详解
-
centos下yum搭建安装linux+apache+mysql+php环境教程
-
WINXP下apache+php4+mysql
-
WampServer下安装多个版本的PHP、mysql、apache图文教程
-
PHP4在WinXP下IIS和Apache2服务器上的安装实例
-
Apache+PHP+MySQL搭建PHP开发环境图文教程
-
Ubuntu 18.04上安装Apache、MySQL、PHP、LAMP的完整教程
-
Win2003下APACHE+PHP5+MYSQL4+PHPMYADMIN 的简易安装配置
-
Windows中安装Apache2和PHP4权威指南
-
APMServ一键快速搭建Apache+PHP+MySQL+Nginx+Memcached+ASP运行平台教程