0

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

4 Answers 4

2

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

0

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

1
  • 1
    You should probably update your question, instead of adding an answer.
    – Zoredache
    Oct 21, 2009 at 20:39
0

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.

0

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)

You must log in to answer this question.