Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS X - How to store web projects in a location other than /Library

Google turns up nothing but very basic set up of web servers on the Mac. I've got that.

I build web projects locally on a Mac using PHP/MySQL. I store the sites in /Library/WebServer/Documents then access them via browsers with http://localhost.

This works fine.

What I would like to do is to be able to place symlinks or aliases of projects into the /WebServer/Documents folder and access sites on other (local) drives. I don't want to have to store everything in the Library folder. However, it seems that symlinks don't work. The only way a project functions is if all it's files are located in the /Library folder - no symlinks.

I realize I can change the root path for the web server in the http.conf file but I don't want to actually change the server path, I merely want to use symlinks if possible. I also realize I could use something like MAMP, but things run fine with my traditional set up (and I prefer to avoid MAMP since it's not always real-world). Main motivation here is that I don't want to store files on the boot volume, where there Library folder is located.

Can I use symlinks for directories with Mac OS10.6.8/Apache? if so how, please?

Thanks!

like image 585
Scott Avatar asked Nov 05 '22 05:11

Scott


1 Answers

Solved via this article at Apple:

http://support.apple.com/kb/TA21182?viewlocale=en_US

One must specifically create a symbolic link. Which, it appears, is not the same as an Alias on the Mac OS.

like image 161
Scott Avatar answered Nov 09 '22 13:11

Scott