Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

OS is windows xp, apache is apache 2.2.

on my windows xp, i have a mapped driver, path is \dev3, under dev3 i have a folder www\project.

now i have added following virtual host to my local apache conf file.

ServerName project.localhost

DocumentRoot "\\dev3\www\project"
DirectoryIndex index.php


<Directory "\\dev3\www\project">
    AllowOverride All
    Allow from all
    Options +FollowSymLinks
</Directory>

after restart the apache server, the apache gave me following warning: Warning: DocumentRoot [C:/dev3/www/project] does not exist.

my question is how can i make the apache to recognize my mapped drive

share|improve this question

4 Answers 4

Apache starts as NT AUTHORITY\SYSTEM so you have to map the drive for the service as described in http://stackoverflow.com/a/4763324

share|improve this answer

i have found a solution, if i run apache from command line, it worked. but not from service.

share|improve this answer
1  
You should probably update your question, instead of adding an answer. –  Zoredache Oct 21 '09 at 20:39

services can't just access mapped network drives that were mapped under your username. maybe you can set the apache service to run under your user account or somehow set up the local service account to access the mapped drive.

share|improve this answer

You could use the following command utility called junction from Mark Russinovich Sysinternals - www.sysinternals.com

junction c:\my_symlink "U:\networkpath\dir"

you could now set your DocumentRoot directive in as C:\my_symlink

restart Apache and that should work.

This however requires that you set have mapped the network drive correctly using net use command (perhaps with the peristence option)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.