1

I have Windows XP professional (SP3) running + XAMPP with Apache 2.2.12. Everything is properly installed and works fine with local drives.

The problem is that I want to access network drive "U:/" using alias defined in Apaches http.conf file:

Alias /w1/ "C:\workspace" // works
Alias /w2/ "U:\workspace" // does not work

Network drive U is hosted somewhere else and i cannot change any settings there. I know that apache is running under another user and therefor is not able to find the network drive U. What can i do to make it work as a windows service?

I already tried to use DocumentRoot/Alias with UNC using the windows service "Log on As" with my own account.

EDIT: What at least works is: Running apache over console using the parameter "-c" with an additional setting apllied after the httpd.conf:

httpd.exe -c "alias /e U:\"
Thariama
  • 106
  • 1
  • 9

1 Answers1

2

If apache is running as system account, it can't use network resources.

If apache is running as normal user, it can use network resources, but only in UNC format \\server\share_name.

Running Apache as service on Windows

Try to use an alias as DocumentRoot:

Alias /home/htdocs //FILESERVER/share/home/htdocs

And then you can use:

DocumentRoot /home/htdocs

lg.
  • 4,649
  • 3
  • 21
  • 20
  • already tried to run the apache service under my own account - but it did not work without UNC. I am still trying to figure out how i get the UNC. – Thariama Jul 15 '10 at 10:22
  • how would the line in httpd.conf look like when using UNC for a local directory? – Thariama Jul 15 '10 at 10:29
  • I added a link in my response, read it! – lg. Jul 15 '10 at 10:59
  • i already tried to run the apache service using "Log on as" my own user account. But the network ressource is still not accessible (DocumentRoot must be a directory). – Thariama Jul 15 '10 at 11:25
  • I found this link (http://adam-carter.com/posts/158) and seems it is possible. Sorry for question, but the account you are using...can access the share? – lg. Jul 15 '10 at 12:24
  • yes the account i am using can access the share – Thariama Jul 15 '10 at 12:26
  • Try with alias...I just edited my answer. Ops...you just tried this solution! I have no more ideas. – lg. Jul 15 '10 at 12:27
  • thx for your help,but it no does not work: "DocumentRoot must be a directory", i somehow got the feeling that the service functionality is not use the permissions of my account while using "Log on" – Thariama Jul 15 '10 at 12:33