简体   繁体   中英

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.

Then thing is, since ~ can be accessed only by my user, apache fails to read from my web project folder.

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. 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

grep -R UserDir *

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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