You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Brian <li...@usa.com> on 2008/03/04 07:10:54 UTC

[users@httpd] Apache 2.2.8 VirtuaHost and a NAS

I have windows XP SP2 and have just upgraded to Apache 2.2.8 and have all of
the settings running for my existing websites on local hard drives.
However, due to a large increase in multimedia content I have added a 2TB
NAS device and have it mapped as a drive letter 'L:' for the local machine
that Apache is running on.  When I change the DocumentRoot in the
virtualhost (httpd-vhosts.conf) and under httpd.conf to read as:

DocumentRoot "L:/test"

When I compile the configs it checks out ok.  Then when starting the Apache
server I get a popup box stating that "requested operation has failed".

Then when checking the error logs I see the message that:

"Syntax error on line 246 of E:/AppServ/Apache 2.2.8/conf/httpd.conf:
<Directory "L:/test"> path is invalid."

Is there no way to reference to a network mapped device that Apache will
accept?  Normally I would direct reference the local NAS device IP via
\\<NAS IP>\share\test\ but I am unsure how that would be entered for Apache.

Thoughts?

Thanks.

Brian



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache 2.2.8 VirtuaHost and a NAS

Posted by Brian <li...@usa.com>.

William A. Rowe, Jr. wrote:

>Joshua Slive wrote:
>> On Tue, Mar 4, 2008 at 7:13 AM, Graeme Fowler <gr...@graemef.net> wrote:
>>> Hi
>>>
>>>  On Mon, 2008-03-03 at 21:10 -0900, Brian wrote:
>>>  > DocumentRoot "L:/test"
>>>
>>>  Wouldn't that be "L:\test", with a backslash?
>> 
>> No, all paths in httpd.conf should use forward slashes.
>> 
>> The problem of not being able to access network drives is typically
>> explained by running apache as a service under privileges that don't
>> allow network access (usually LocalSystem). See:
>> http://httpd.apache.org/docs/2.2/platform/windows.html#winsvc
>
>Exactly; it's also worth using //machine/share/ syntax instead of L: since
>the service control manager won't mount up L: for you.
>
>But if the service "run as" account doesn't have access to //machine/share,
>httpd won't start.  See your application event log for details.
>

Ok, thank you both to you Will and Joshua!  It works now.  First off in case
anyone tried to do something similar setting it up to run as a windows
account which has access to the NAS was already done, but I missed the step
where it had to have log on as a service modified.

1. Create a normal domain user account, and be sure to memorize its
password. 

**2. Grant the newly-created user a privilege of Log on as a service and Act
as part of the operating system. You can also manually set these via the
Local Security Policy MMC snap-in. **

3. Confirm that the created account is a member of the Users group. 
Grant the account read and execute (RX) rights to all document and script
folders (htdocs and cgi-bin for example). 

4. Grant the account change (RWXD) rights to the Apache logs directory. 

5. Grant the account read and execute (RX) rights to the httpd.exe binary
executable

Additionally I did not know until now that the service control manager would
not mount the drive even though it shows in the OS as already being mounted.
Good to know.  And yes, //<NAS name>/share/test/ did work perfectly!!  

Thanks again to both of you.

Brian



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.2.8 VirtuaHost and a NAS

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Joshua Slive wrote:
> On Tue, Mar 4, 2008 at 7:13 AM, Graeme Fowler <gr...@graemef.net> wrote:
>> Hi
>>
>>  On Mon, 2008-03-03 at 21:10 -0900, Brian wrote:
>>  > DocumentRoot "L:/test"
>>
>>  Wouldn't that be "L:\test", with a backslash?
> 
> No, all paths in httpd.conf should use forward slashes.
> 
> The problem of not being able to access network drives is typically
> explained by running apache as a service under privileges that don't
> allow network access (usually LocalSystem). See:
> http://httpd.apache.org/docs/2.2/platform/windows.html#winsvc

Exactly; it's also worth using //machine/share/ syntax instead of L: since
the service control manager won't mount up L: for you.

But if the service "run as" account doesn't have access to //machine/share,
httpd won't start.  See your application event log for details.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.2.8 VirtuaHost and a NAS

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, Mar 4, 2008 at 7:13 AM, Graeme Fowler <gr...@graemef.net> wrote:
> Hi
>
>  On Mon, 2008-03-03 at 21:10 -0900, Brian wrote:
>  > DocumentRoot "L:/test"
>
>  Wouldn't that be "L:\test", with a backslash?

No, all paths in httpd.conf should use forward slashes.

The problem of not being able to access network drives is typically
explained by running apache as a service under privileges that don't
allow network access (usually LocalSystem). See:
http://httpd.apache.org/docs/2.2/platform/windows.html#winsvc

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache 2.2.8 VirtuaHost and a NAS

Posted by Brian <li...@usa.com>.
Yes but all of the paths are treated as Unix style.  Ie...

The original working website works with a local hard drive called 'E:'

So "E:/test/" works and displays the website.

However

"L:/test/" does not.

-----Original Message-----
From: Graeme Fowler [mailto:graeme@graemef.net] 
Sent: Tuesday, March 04, 2008 3:13 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache 2.2.8 VirtuaHost and a NAS

Hi

On Mon, 2008-03-03 at 21:10 -0900, Brian wrote:
> DocumentRoot "L:/test"

Wouldn't that be "L:\test", with a backslash?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.2.8 VirtuaHost and a NAS

Posted by Graeme Fowler <gr...@graemef.net>.
Hi

On Mon, 2008-03-03 at 21:10 -0900, Brian wrote:
> DocumentRoot "L:/test"

Wouldn't that be "L:\test", with a backslash?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org