I can use mklink /D
to create a directory symlink on Windows, and XAMPP has no problem following it and using the files in it.
But when I'm symlinking to a network share rather than just another local folder, although it still works fine in Windows, XAMPP's Apache can not see it at all.
Is there any way around this, or is it impossible to symlink a network share with XAMPP?
(XAMPP's httpd.conf (in C:\xampp\apache\httpd.conf) has Options FollowSymLinks
turned on by default - and it's working, as evidenced by the local folder example)
Edit: this is on XAMPP 3.2.1 on Windows 10 Pro
I hunted around here on SO first for an answer, as well as on ServerFault. Eventually by putting together a few answers from across the web I was able to solve this.
The solution is two-fold and isn't actually to do with the symlink at all: Apache doesn't like mapped network drives, and it can't access network shares anyway unless it's running as a user that can.
So, the full instructions for symlinking a directory to a network share with XAMPP are as follows:
cmd.exe
on your desktop and right click it)mklink /D C:\xampp\htdocs\full\path\to\the\new\folder \\NETWORK-SHARE-NAME-OR-IP\full\path\to\the\existing\folder
services.msc
(Start -> Run), and open Apache from the list of servicesThat should be it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With