Apache Virtual Host in Windows - how do I deal wit

2019-04-11 20:47发布

问题:

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...