# Windows network: Set apache DocumentRoot in network directory

I set a network with a physical machine and a virtual machine, both with Windows 7.

I set an apache server in the virtual machine to listen in port 80, now it's working if I set DocumentRoot inside virtual machine (same one than Apache Server), but I would like my documents to be in physical machine directory, and if I try to set DocumentRoot in a network directory I get an error in Event Manager saying DocumentRoot must be a directory.

• In the Apache machine I added this directory as a network unit, like Z:/myfolder
• In the physical machine I set this folder as Shared and give permissions to All for reading and writing

I'm not very good configuring networks so I may be missing something about permissions or whatever, but when I open this folder in Windows explorer I'm not prompted for login or anything.

-
Does the user that Apache is running as have the Z: drive mapped, or just your user? –  Shane Madden Dec 30 '11 at 17:31
How can I know that? The Apache system is being runned by "Local System" so you might be in the right direction... But how can I add this folder for "Local System"? Thank ypu –  user761076 Dec 31 '11 at 10:13

But, if you do want to keep it running as local system, there's an ugly hack that can do the trick; grab psexec, run psexec -i -s cmd.exe, then map the drive with net use z: \\path\to\share /persistent:yes.
After trying, I encounter a new problem: when I run command prompt through psexec I don't see host machine, my user in that command promt is VIRTUALMACHINE$(good, that's the user I want to give access) but this user does not even see HOST_MACHINE. How can I get this user to see HOST_MACHINE? HOST_MACHINE has total control access to EVERYBODY and VIRTUALMACHINE$ dos not see it... –  user761076 Jan 2 '12 at 12:38
Clarify what you mean by "does not even see HOST_MACHINE". Did you try a net use command? What was the result? And again, why are you not using UNC paths instead?? –  Shane Madden Jan 3 '12 at 6:43