简体   繁体   English

创建虚拟主机时,Apache仅适用于/ var / www / html /目录

[英]When creating virtual-host, apache would work only with /var/www/html/ directory

I just moved from WAMP to LAMP, and can't figure out this problem that I am facing. 我只是从WAMP移到LAMP,无法弄清我面临的这个问题。 Whenever I create new vhost which is not in this directory /var/www/html/ i get a 403 forbidden message. 每当我创建不在此目录/var/www/html/新虚拟主机时,都会收到403禁止消息。 (Permission are the same and there is an index file) (权限是相同的,并且有一个索引文件)

It seems to me that somewhere in Linux you specify a list of directories and apache works explicitly with those ones. 在我看来,在Linux的某个地方,您可以指定目录列表,而apache可以明确地与这些目录一起使用。

I use Apache 2.4.6. 我使用Apache 2.4.6。

I appreciate your help, 我感谢您的帮助,

After checking the error log(vhost), I found this error message "search permissions are missing on a component of the path". 检查错误日志(vhost)后,我发现此错误消息“路径的某个组件上缺少搜索权限”。 Meaning that one of the parent directories from where the vhost was located didn't not have search (+x) permission for the apache user. 这意味着虚拟主机所在的父目录之一没有针对apache用户的搜索(+ x)​​权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM