Mac OS X - How to Store Web Projects in a Different Place Than / Library

Google creates nothing but the very simple setup of web servers on a Mac. I have it.

I am creating web projects locally on a Mac using PHP / MySQL. I store sites in / Library / WebServer / Documents, then access them through browsers with http: // localhost .

It works great.

What I would like to do is to place symbolic links or project aliases in the / WebServer / Documents folder and gain access to sites on other (local) drives. I do not want to store everything in the Library folder. However, symbolic links do not seem to work. The only way the project works: if all its files are in the / Library folder - no symbolic links.

I understand that I can change the root path for the web server in the http.conf file, but I do not want to actually change the server path, I just want to use symbolic links if possible. I also understand that I can use something like MAMP, but everything works fine with my traditional setup (and I prefer to avoid MAMP, as this is not always in the real world). The main motivation here is that I do not want to store files on the boot volume where the library folder is located.

Can I use symbolic links for directories with Mac OS10.6.8 / Apache? if yes, please, please?

Thank!

+5
source share
3 answers

Solved through this article at Apple:

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

. , , Mac OS.

+4

MAMP, -. MAMP , apache (httpd.conf, vhost.conf).

-1

you should use symbolic links instead of an alias ... there is no ui for this!

you need to enter the terminal and enter:

ln -s /ORIGINALPATH /LINKEDPATH

the first PATH is the base path for the source file, and the second for the base path for the symbolic link of the file / folder, etc.

-1
source

All Articles