如何添加$ HOME变量在Apache中的DocumentRoot [英] how to add $HOME variable in apache DocumentRoot
本文介绍了如何添加$ HOME变量在Apache中的DocumentRoot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能让Apache的DocumentRoot像
how can i make apache documentroot like
的DocumentRoot $ HOME /无功/网络
DocumentRoot $HOME/var/www
这是显示无效的路径错误。
It is showing invalid path error.
推荐答案
尝试:
而不是$ HOME $ {HOME}
Try: ${HOME} instead of $HOME
另请参阅:
http://httpd.apache.org/docs/2.2/configuring.html#syntax
这可能仍然无法解决您的问题,它可能是$ HOME未在此背景下定义,或者如果它是指向一个不存在的目录。试试运行:
apachectl中configtest
That may still not solve your problem, it may be that $HOME is not defined in this context or if it is it is pointing to an non-existent directory. Try running: apachectl configtest
,以确保一切看起来不错。
to make sure everything looks ok.
这篇关于如何添加$ HOME变量在Apache中的DocumentRoot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文