如何在www目录中创建符号链接?
我什至不确定这是正确的方法,但我正在寻求一些建议。我正在 Mac 上进行开发,但使用 VMWare 在 Windows 中运行该项目。
我正在使用 WAMPserver 2.2A。我的目录如下所示:
C:\Users\John Doe\Development\project-web\
C:\wamp\www\
我想要的是在 project-web 中开发我的项目,但在 www 中有一个符号链接,这样我就可以在浏览器中使用 apache 运行它。这就是我尝试过的:
mklink project "C:\Users\John Doe\Development\project-web\"
当尝试以这种方式处理它时,我遇到了一些权限错误。我觉得这比将项目存储在 \www\ 中更好,但我可能是错的。
任何建议都会很棒!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,Apache 通常不遵循符号链接,因为它们可以轻松地用于突破文档根目录。我建议考虑使用 Apache Alias 来创建映射到您的开发目录的虚拟 Apache 文件夹
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