[英]Where should I put my workspace directory when working with Apache?
I usually put my workspace directory under ~. 我通常将工作区目录放在〜下。
I recently created a new web project and put it inside my workspace directory. 我最近创建了一个新的Web项目,并将其放在我的工作区目录中。
Then thing is, since ~ can be accessed only by my user, apache fails to read from my web project folder. 然后是,由于〜只能由我的用户访问,因此apache无法从我的Web项目文件夹中读取。
I can do all sort of magic to make it work. 我可以做各种魔术使它起作用。 But I really would like to hear what are the best practices in this case?
但我真的很想听听这种情况下的最佳做法是什么?
Where should I put my workspace directory? 我应该在哪里放置工作区目录? Considering I have lot of other projects apart of the web one.
考虑到我还有很多除网络项目之外的其他项目。
Thanks 谢谢
Usually apache is configured that users use public_html in their home directories to put the files that would like to be accessible from web. 通常,将apache配置为用户在其主目录中使用public_html来放置希望从Web访问的文件。 This way they can be accessed like this http://mywebserver/~myusername/ Go to your apache conf directory /etc/apache2 for Debian based distros and /etc/httpd for redhat based and execute
这样,就可以像这样访问它们了:http:// mywebserver /〜myusername /对于基于Debian的发行版,请转到您的apache conf目录/ etc / apache2;对于基于redhat的,请转到/ etc / httpd并执行
grep -R UserDir *
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.