Can't start apache with a mapped network drive in vhost Apache Web Server forum at WebmasterWorld
 Welcome to WebmasterWorld Guest from 54.197.122.41 register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts, Subscribe and Support WebmasterWorld
 Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library : Charter : Moderators: Ocean10000 & incrediBILL & phranque

# Apache Web Server Forum

 This 39 message thread spans 2 pages: < < 39 ( 1 [2] ) Tweet
Can't start apache with a mapped network drive in vhost
mattdw

msg:3949192
1:41 pm on Jul 9, 2009 (gmt 0)

Hi all, having a problem that I've Googled to death and can't find an answer to. I'm running apache 2.2.11 under Windows Vista Home Premium, and I'm having a problem when trying to use a virtual host with the document root on a network drive.

For example, say my mapped network drive is Z:, I'm using:
DocumentRoot z:/home/htdocs/

When I put that in, apache won't start. Now here's the weird part: if I use the full UNC path (say //remote-server/shared/home/htdocs), then apache starts just fine. The problem is, the way most of the site is configured, it is looking for that /home/htdocs directory to be the site root, not that full UNC path, so everything gets messed up. And since the files get copied directly from there to the production site, I can't really be switching code back and forth. Even more strange is a co-worker's computer is the same OS and apache version as mine and his works just fine.

And just to be clear, I can connect in Windows just fine to the network drive. I've also tried running the apache service as the user I log in with instead of Local System, and that didn't work either. Any thoughts are greatly appreciated, thanks!

Brett_Tabke

msg:3958546
1:57 am on Jul 24, 2009 (gmt 0)

>Did you try to run apache via console and not via the service control manager?

ya, either way - no difference.

Ocean10000

msg:3958582
4:06 am on Jul 24, 2009 (gmt 0)

Have you tried FileMon from Sysinternals. To see what files Apache is reading, or trying to read locally.

youfoundjake

msg:3958595
4:33 am on Jul 24, 2009 (gmt 0)

what about adding z:/home/htdocs/ to the trusted sites in internet explorer (for the time being) on the client machine?

youfoundjake

msg:3958596
4:42 am on Jul 24, 2009 (gmt 0)

mine is:
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.x.x

Course im just throwing stuff at the wall and seeing what sticks..

JS_Harris

msg:3958702
8:01 am on Jul 24, 2009 (gmt 0)

Just a question, you're BOTH using a name based configuration correct? It's been a while but I fixed something similar by specifying a different IP address for each virtual host, which is something you don't need to do with name based setups.

shri

msg:3958731
8:40 am on Jul 24, 2009 (gmt 0)

Set the error log to debug and checked it for any relevant messages?

Brett_Tabke

msg:3958903
1:56 pm on Jul 24, 2009 (gmt 0)

>Set the error log to debug and checked it for any relevant messages?

It is set there. We get a general error saying that Apache can't start - and it dies.

 Just a question, you're BOTH using a name based configuration correct? It's been a while but I fixed something similar by specifying a different IP address for each virtual host, which is something you don't need to do with name based setups.

I will check (mattdw not around today). On mine - i use hard coded IP's.
eg:
 DocumentRoot /home/billthecat/webmasterworld.com/htdocs/ ServerName www.webmasterworld.com ServerAdmin webmaster@webmasterworld.com CustomLog logs/access.log combined CustomLog logs/taccess.log common CustomLog logs/agent.log agent ScriptAlias /cgi-bin /home/billthecat/webmasterworld.com/htdocs/cgi-bin TransferLog logs/WebmasterWorld-access.log ScriptLog logs/WebmasterWorld-scripterror.log LogLevel debug

and then we just flip in/out our hosts file. snippet:

 127.0.0.11 www.searchengineworld.com 127.0.0.12 www.newsraid.com 127.0.0.13 www.traxis.com 127.0.0.15 www.webmasterworld.com

I think matt is using some wildcards for some vhosts.



I am sure we tried it both ways.

@youfoundjake - I Don't think we have trid that.

> Have you tried FileMon from Sysinternals.
> To see what files Apache is reading, or trying to read locally.

I know FileMon well. What would we be looking for there?

Ocean10000

msg:3958940
2:39 pm on Jul 24, 2009 (gmt 0)

I am trying to figure out if its actually looking on the network or on the local computer for the root directory and not finding it and dieing.

Caterham

msg:3968855
6:19 pm on Aug 9, 2009 (gmt 0)

 >Did you try to run apache via console and not via the service control manager? ya, either way - no difference.

Just tested; running from the console, i.e., not to start the service from console via net start ... but calling
C:\> C:\path\to\apache\bin\httpd.exe

(running apache from console) worked for me. The problem seems to be that the scm, even if the service is set to a user account, does not repeat the network drive mapping when starting the service under user x. But that's a problem of M\$ and not Apache.

This 39 message thread spans 2 pages: < < 39 ( 1 [2]
 Global Options: top home search open messages active posts  Tweet

 Home / Forums Index / Code, Content, and Presentation / Apache Web Server