在Linux系统中,DocumentRoot是Apache服务器配置文件中一个非常重要的参数。它定义了网站根目录的路径,也就是Web服务器用来查找和提供网页内容的位置。通过配置DocumentRoot,用户可以控制访问页面的位置以及网站的内容。 DocumentRoot的主要作用是将网页所在的目录与网站的URL对应起来。当用户访问网站时,服务器会根据URL请求来定位对应的页面文件。如果Docum
原创 3月前
28阅读
今日一台同事的虚拟机安装了httpd,然后修改DocumentRoot,但是无论怎么修改都会启动报错DocumentRoot must be a directory。查看目录权限,root的正常可以查看到的,然后想,是否apache用户进不了目录(root用户创建文件夹)。修改文件夹所属用户后还是一样报错,无法启动httpd。仔细想了下,linux系统貌似还有个SElinux安全机制,查看一下状
原创 2010-11-05 12:25:09
4954阅读
2点赞
1评论
启动apache时提示: 启动 httpd:Warning: DocumentRoot [/userhome/soft/] does not exist 由于selinux的设置问题 解决方法: setsebool -P httpd_disable_trans on  
原创 2011-12-30 22:26:10
2013阅读
 apache提示DocumentRoot must be a directory的问题 将DocumentRoot改为/opt/www后提示:Starting httpd: Syntax error on line 293 of /etc/httpd/conf/httpd.conf:DocumentRoot must be a directory百度一圈都说是修改目标文件夹的
原创 2013-12-03 13:41:40
999阅读
今天在修改了一下httpd.conf文件的DocumentRoot目录后重启了httpd服务,却发现报错了。 DocumentRoot must be a directory 。刚开始以为是自己配置有问题,后来检查了好一遍并确认配置的DocumentRoot就是一个directory啊。哎,只好baidu一下了。呵呵,看来遇到过这种报错的人还真不少啊。总结起来有两种可能导致了DocumentRoo
转载 精选 2012-08-02 15:13:04
6899阅读
 DocumentRoot 指令 说明 组成网络上可见的主文档树的根目录 语法 DocumentRoot directory-path 默认值 DocumentRoot /usr/local/apache2/htdocs 作用域 server config, virtual host 状态 核心(C) 模块 core 此指令设置了httpd伺服的目录。在没有使用类
转载 2011-02-21 15:46:42
4627阅读
今天配置好Apache+PHP+MySQL但是apache默认DocumentRoot是/var/www想把它改到我Windows下进行测试的k:/wwwroot把 apache2.conf 翻了好几遍,连DocumentRoot都搜不到然后再仔细的看apache2.conf终于发现有这么一句:In
转载 2016-09-08 10:04:00
124阅读
2评论
今天配置好Apache+PHP+MySQL 但是apache默认DocumentRoot是/var/www 想把它改到我Windows下进行测试的k:/wwwroot 把 apache2.conf 翻了好
转载 2008-07-21 16:40:00
395阅读
2评论
 在配置apache服务时经常遇到DocumentRoot must be a directory的错误提示,刚接触到apache时折腾了几个小时才找到错误的原因,出现这样的错误一般都是由于selinux的原因。 SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux® 上最杰出的新安全子系统。
原创 2011-08-28 18:20:14
5545阅读
宝塔服务器重启Apache提示!问题1AH00112: Warning: DocumentRoot [/www/server/stop/public] does not exist意思是:/www/server/stop/public 文件夹不存在那么我们手动创建一下这个文件夹就好了。问题2AH00112: Warning: DocumentRoot [/www/server/phpinfo] does not exist意思是:/www/server/public 文件夹不
原创 2022-04-15 16:53:57
776阅读
开始还以为是权限问题呢,后来改了权限还是如此,原来Apache认为这个不是目录!但是将DocumentRoot ""对准其它目录则没有问题,服务器可以正常工作。不知道大家有没有看到这么apache配置文件里这样一段话## UserDir: The name of the directory that is appended onto a user's home# directory if a ~u
原创 2013-02-03 01:21:18
1061阅读
上一篇修改完 DocumentRoot访问localhost出现如下错误ForbiddenYou don't have permission to access /myDemo/ on this server. 折腾了一番终于找到了解决办法,这是我的部分配置文件内容 <Directory /> AllowOverride none Requir...
原创 2021-11-18 15:47:31
587阅读
網頁首頁及目錄相關之權限設定 (DocumentRoot 與 Directory) 我們不是講過 CentOS 的 WWW 預設首頁放置在 /var/www/html 這個目錄嗎?為什麼呢?因為 DocumentRoot 這個設定值的關係啦!此外,由於 Apache 允許 Internet 對我們的資料進行瀏覽, 所以你當然必須要針對可被瀏覽的目錄進行權限的相關設定,那就是 <Direc
原创 2012-04-15 10:25:18
9073阅读
2点赞
首先注释掉 DocumentRoot /var/www/html DocumentRoot /home/wxwb ServerName www.centostest.com
转载 2015-02-02 17:26:00
90阅读
2评论
#ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html 1.DocumentRoot DocumentRoot指定apache服务器网页(文档)根目录 DocumentRoot "/home/iflow/apache2/htdocs" 2.Director Directory用于...
原创 2023-04-17 10:23:42
152阅读
1.安装相应的工具yum install -y yum-utils createrepo httpd2.修改/etc/httpd/conf/httpd.conf#将DocumentRoot "/var/www/html"改为自己设置的路径/notebooks/download/hdp# DocumentRoot "/var/www/html"DocumentRoot "/notebooks/dow
原创 2023-01-10 00:11:18
394阅读
Apache重启时报警: AH00112: Warning: DocumentRoot [/usr/local/apache/docs/dummy-host.example.com] does not exist AH00112: Warning: DocumentRoot [/usr/local/
转载 2017-11-23 13:54:00
19阅读
2评论
<VirtualHost *:80>    #DocumentRoot "D:\phpStudy\WWW\123"    DocumentRoot "D:\phpStudy\WWW\123"    ServerName www.123.com    ServerAlias   <Directory "D:\phpStudy\WWW\123">      Opti...
php
原创 2021-07-09 15:41:08
222阅读
  #DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"  DocumentRoot "D:/vss" #修改root文件夹  #  # Each directory to which Apache has access can be configured with respect  # to which se
原创 2013-11-06 10:46:40
738阅读
  • 1
  • 2
  • 3
  • 4
  • 5