Apache Virtual Host in Windows - how do I deal with Symbolic links?

感情迁移 提交于 2019-12-06 04:45:54

问题


I'm trying to run a virtual host on a WAPP stack. My virtual host has the FollowSymLinks option, but in Windows, all those symbolic links (I'm using shortcuts, and I think this may be the problem) have the .lnk extension. So if I'm trying to access settings.html, Apache can't find it because all i have sitting there is settings.html.lnk. Apologies if my question is unclear.


回答1:


Apache doesn't understand shortcuts. You need to use a proper symlink. On windows this is accomplished using the command line tool mklink. See http://ipggi.wordpress.com/2009/09/07/windows-file-junctions-symbolic-links-and-hard-links/ for more details.




回答2:


For security reasons, symlinks aren't followed by default on Apache.

Better than enable it in the config file with "Options FollowSymLinks" you should use

http://httpd.apache.org/docs/current/urlmapping.html#outside

That's not exactly the answer you expected but may help...



来源:https://stackoverflow.com/questions/3034860/apache-virtual-host-in-windows-how-do-i-deal-with-symbolic-links

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