首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Apache忽略DocumentRoot

Apache忽略DocumentRoot
EN

Stack Overflow用户
提问于 2016-12-26 13:38:11
回答 0查看 1.7K关注 0票数 0

我正在尝试修改Apache中虚拟主机的DocumentRoot。虚拟主机的DocumentRoot设置将被忽略,而是使用总体DocumentRoot。

在我的例子中,Apache使用/Applications/AMPPS/www/public作为根文件夹,而不是使用/Applications/AMPPS/www /public作为根文件夹。

httpd.conf文件的相关部分如下所示。有没有人看到问题了?

代码语言:javascript
复制
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,  but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Applications/AMPPS/www"

...snip...

<VirtualHost 127.0.0.1:80>
<Directory "/Applications/AMPPS/www">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName localhost
ServerAlias localhost 127.0.0.1
ScriptAlias /cgi-bin/ "/Applications/AMPPS/www/cgi-bin/"
DocumentRoot "/Applications/AMPPS/www/public"
ErrorLog "/Applications/AMPPS/apache/logs/error_log"
CustomLog "/Applications/AMPPS/apache/logs/access.log" combined
</VirtualHost>
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41326861

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档