简体   繁体   English

使用Apache时,应将工作区目录放在哪里?

[英]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.

相关问题 我应该把我的python脚本放在Linux中? - Where I should put my python scripts in Linux? 将应用程序放在哪里,以便无论工作目录如何我都可以使用它们? - Where to put application so I can use them no matter working directory? 从“ Docker Hub”下载映像后,应将配置文件放在哪里? 在数据量上? - After downloading image from “Docker Hub”, where should I put my configuration file? In data volume? 我应该把我的Node.js web项目文件夹放在Ubuntu 14中? - Where should I put my Node.js web project folder in Ubuntu 14? 在EC2上使用Apache时,如何允许我的apache用户上载到用户目录? - How can I allow my apache user to upload to user directory when using Apache on EC2? 在我的 apache2 服务器上放置构建的 nodejs 应用程序的位置 - Where to put builded nodejs application on my apache2 server 软件配置文件,在Linux系统中应该放在哪里? - Software configuration files, where should I put them in Linux systems? 我应该在哪里放置“ down”文件以防止Chef启动 - Where should I put the “down” file to prevent Chef from starting 我应该在主管配置文件中输入哪个进程号? - What process number should I put in my supervisor config file? 哪里管理Apache后备目录 - Where to administer apache fallback directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM