apache配置文件中的documentroot
来源:互联网 发布:2017中国制造业数据 编辑:程序博客网 时间:2024/05/10 13:59
DocumentRoot:你的文档的根目录。默认情况下,所有的请求从这个目录进行应答。
对于刚接触apache的人来说,这个概念很难让人轻松接受,最开始我就把它理解为对于apache的所有操作请求所通过的路径,可后来发现这样子的理解是不完全正确的,也是不能清晰的概括出documentroot的真实作用。
DocumentRoot:应该是定义这个服务器对外发布的超文本文档存放的路径,也就是说,客户程序请求的URL就被映射为这个目录下的网页文件,这个目录下的子目录,以及符号连接指出的文件和目录都能被浏览器访问。
也可以这么说,如果DocumentRoot=E:\Code\Ivalley 那么,在htdocs下的所有文件、目录等都可以被浏览器访问(我的理解是:Ivalley下的所有文件、目录等都可以被浏览器通过已经定义好的域名进行访问),DocumentRoot提供了浏览器与服务器互交的一个通道,通过DocumentRoot我们可以看到服务器中所想在网页上表现的所有东西。
当然,DocumentRoot下的所有东西并不是都希望被浏览器访问,像符号连接指出的文件就可以通过目录访问控制中提供的followsymlinks选项来打开或关闭支持与否的特性。还可以利用 order allow,deny 命令来控制访问服务器的一个固定区域及控制禁止访问服务器的主机。
如:
<VirtualHost *:80>
DocumentRoot "E:\Code\Ivalley"
ServerName www.myivalley.com
DirectoryIndex index.php
</VirtualHost>
<Directory "E:\Code\Ivalley">
Allow from all
AllowOverride all
</Directory>
- apache配置文件中的documentroot
- 修改apache得documentroot
- 修改 Apache 文件根目录 (DocumentRoot)
- 如何修改apache得documentroot
- DocumentRoot
- Apache httpd.conf 配置 之 DocumentRoot
- Apache 下更改 DocumentRoot 和新建虚拟目录
- Apache 下更改 DocumentRoot 和新建虚拟目录
- Multiple DocumentRoot on Apache on Win7
- Apache 下更改 DocumentRoot 和新建虚拟目录
- Apache HTTP Server 的文件根目录(DocumentRoot)
- 通过apache访问非documentroot下面的程序
- [liunx apache配置]DocumentRoot does not exist解决方法
- 如何设置 Apache HTTP Server 的文件根目录(DocumentRoot)
- apache如何一个ServerName对应多个DocumentRoot
- Ubuntu中Apache修改DocumentRoot(修改网站根目录)
- WAMP的apache无法启动DocumentRoot must be a directory
- 设置 Apache HTTP Server 的文件根目录(DocumentRoot)
- 图片漂浮被flash遮盖,修改flash代码
- 小米3莫名进入recovery模式后的处理
- 产品管理(Product Management)
- webgis
- mysql数据类型有哪些
- apache配置文件中的documentroot
- 关于Cookie的路径及Cookie的获取问题?
- Lib和Dll
- datagrid设置样式
- 多目标跟踪-Multi-Object Tracking
- Git常用命令
- 在linux中添加字体
- as紧急奔溃检查
- js获取url参数值