问题
I'm not even sure this is the right way to do this, but I am looking for some advice. I am developing on a Mac, but using VMWare to run this project in Windows.
I am using WAMPserver 2.2A. My directories look like this:
C:\Users\John Doe\Development\project-web\
C:\wamp\www\
What I would like, is to develop my project in project-web, but have a symlink in www so I can run it in the browser with apache. This is what I tried:
mklink project "C:\Users\John Doe\Development\project-web\"
I ran into some permissions errors when trying to approach it this way. I feel like this would be better than storing the project in \www\ but I might be wrong.
Any advice would be great!
回答1:
Apache generally doesn't follow symlinks by default, as they can be trivially used to break out of the document root. I'd suggest looking into using an Apache Alias instead to create a virtual Apache folder that maps to your development directory
来源:https://stackoverflow.com/questions/8538022/how-to-create-a-symbolic-link-in-the-www-directory