Jump to content

Path in Documentroot for Virtual host.


coachjack

Recommended Posts

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.

 

 

Link to comment
https://forums.phpfreaks.com/topic/210949-path-in-documentroot-for-virtual-host/
Share on other sites

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.