tin*_*tin 16 mac-osx apache-2.2
根据 httpd.conf,文档根目录的默认位置是/Library/WebServer/Documents
. 我想要这个位置/webcontent
。为此,我在 root(/) 中创建了一个 webcontent 文件夹。然后在 httpd.conf 中:
/webcontent
<Directory "/webcontent">
;重新启动 Apache 后,我得到以下页面:
禁止的
您无权访问 / 在此服务器上。
谁能告诉我是否需要更改其他任何地方的任何权限来更改文档根目录?
Bra*_*man 15
httpd.conf
OS X 提供的文件有一个默认拒绝,可以锁定每个客户端的每个目录。然后它允许访问DocumentRoot
目录——这将是/Library/WebServer/Documents
. 在该文件中向下翻页,您将看到:
<Directory "/Library/WebServer/Documents">
# [...]
Options Indexes FollowSymLinks MultiViews
# [...]
AllowOverride None
# [...]
Order allow,deny
Allow from all
</Directory>
Run Code Online (Sandbox Code Playgroud)
将"/Library/WebServer/Documents"
位更改为"/webcontent"
,你很好。
归档时间: |
|
查看次数: |
44758 次 |
最近记录: |