简体   繁体   English

Windows中的Apache虚拟主机 - 如何处理符号链接?

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

I'm trying to run a virtual host on a WAPP stack. 我正在尝试在WAPP堆栈上运行虚拟主机。 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. 我的虚拟主机有FollowSymLinks选项,但在Windows中,所有这些符号链接(我使用快捷方式,我认为这可能是问题)都有.lnk扩展名。 So if I'm trying to access settings.html , Apache can't find it because all i have sitting there is settings.html.lnk . 因此,如果我正在尝试访问settings.html ,Apache无法找到它,因为我坐在那里的是settings.html.lnk Apologies if my question is unclear. 如果我的问题不清楚,请道歉。

Apache doesn't understand shortcuts. Apache不了解快捷方式。 You need to use a proper symlink. 您需要使用正确的符号链接。 On windows this is accomplished using the command line tool mklink . 在Windows上,这是使用命令行工具mklink See http://ipggi.wordpress.com/2009/09/07/windows-file-junctions-symbolic-links-and-hard-links/ for more details. 有关详细信息,请参阅http://ipggi.wordpress.com/2009/09/07/windows-file-junctions-symbolic-links-and-hard-links/

For security reasons, symlinks aren't followed by default on Apache. 出于安全原因,Apache上没有默认遵循符号链接。

Better than enable it in the config file with "Options FollowSymLinks" you should use 比使用“Options FollowSymLinks”在配置文件中启用它更好

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

That's not exactly the answer you expected but may help... 这不是你预期的答案,但可能会有所帮助......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM