coachjack Posted August 17, 2010 Share Posted August 17, 2010 Hi all, Hope you can help me on an issue i've been struggling with for the last 2 days. Allready searched the complete internet so this is my last hope. I try to set up a Virtualhost in Apache 2.2 on a Windows 7 computer, see below. <VirtualHost *:80> DocumentRoot "\\comp01-kamer\D$\Development\mysite" ServerName local.mysite.own </VirtualHost> I try to reach a shared disk (D$) that is located on the machine \\comp01-kamer. When i test with httpd -t the following output occurs: Warning: DocumentRoot [C:/comp01-kamer/D$/Development/mysite] does not exist As you can see Apache puts a C:/ before the Documentroot, therefor being unable to find it. Does anyone know the right way to refer to my shared harddisk? Thanks in advance, Jack. P.s. other Virtualhosts, using a local disk, work fine. Quote Link to comment https://forums.phpfreaks.com/topic/210949-path-in-documentroot-for-virtual-host/ Share on other sites More sharing options...
trq Posted August 17, 2010 Share Posted August 17, 2010 You will need to actually map the drive to a drive letter first. Quote Link to comment https://forums.phpfreaks.com/topic/210949-path-in-documentroot-for-virtual-host/#findComment-1100256 Share on other sites More sharing options...
coachjack Posted August 17, 2010 Author Share Posted August 17, 2010 Thanx for your reply. The drive letter is Z: When is use Z: instead of //comp01-kamer/D$ however (which i did try allready), Apache even refuses to start. Quote Link to comment https://forums.phpfreaks.com/topic/210949-path-in-documentroot-for-virtual-host/#findComment-1100260 Share on other sites More sharing options...
trq Posted August 17, 2010 Share Posted August 17, 2010 A Google shows that this is quit the common problem, not many solutions around though, and I'm not a Windows user so would only be guessing. Some suggest making an alias, then using that as your document root. <VirtualHost *:80> Alias /foo "//comp01-kamer/D$/Development/mysite" DocumentRoot /foo ServerName local.mysite.own </VirtualHost> Its worth a shot. Quote Link to comment https://forums.phpfreaks.com/topic/210949-path-in-documentroot-for-virtual-host/#findComment-1100268 Share on other sites More sharing options...
coachjack Posted August 17, 2010 Author Share Posted August 17, 2010 Sure worth the try... Unfortunately Apache sticks to his previous behavior, now resulting in the following mnessage: Warning: DocumentRoot [C:/foo] does not exist Thanks for the suggestion tho... Quote Link to comment https://forums.phpfreaks.com/topic/210949-path-in-documentroot-for-virtual-host/#findComment-1100279 Share on other sites More sharing options...
steviewdr Posted August 17, 2010 Share Posted August 17, 2010 Have a go at creating a symlink or junction point. See: http://sburke.eu/blog/2010/04/symlinks-in-vista/ It is the same in vista and Win 7. This should work for you. Post back here if it works. -steve Quote Link to comment https://forums.phpfreaks.com/topic/210949-path-in-documentroot-for-virtual-host/#findComment-1100511 Share on other sites More sharing options...
coachjack Posted August 19, 2010 Author Share Posted August 19, 2010 I'm making a huge leap forward due to the tip about the symlink. The warning about the documentroot that does not exist has disappeared. After that i still could not open the site (HTTP 403 error). I had to run the Apache-process as an administrator to solve that part. I'm still facing some smaller (i hope) issues, when everythiung really works i will post a complete solution here. Thanx for the help so far. Jack. Quote Link to comment https://forums.phpfreaks.com/topic/210949-path-in-documentroot-for-virtual-host/#findComment-1101124 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.