How to create a symbolic link in the www directory?

你。 提交于 2019-12-13 16:16:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!