Welcome to WebmasterWorld Guest from 54.162.226.212

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Can't start apache with a mapped network drive in vhost

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

5+ Year Member



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!

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

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month Best Post Of The Month



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

ya, either way - no difference.

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

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Have you tried FileMon from Sysinternals. To see what files Apache is reading, or trying to read locally.
4:33 am on Jul 24, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



what about adding z:/home/htdocs/ to the trusted sites in internet explorer (for the time being) on the client machine?
4:42 am on Jul 24, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



oh, and have you added the client ip address to http.conf?
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..

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

WebmasterWorld Senior Member 5+ Year Member



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.
8:40 am on Jul 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Set the error log to debug and checked it for any relevant messages?
1:56 pm on Jul 24, 2009 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month Best Post Of The Month



>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:

<VirtualHost 127.0.0.15>
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
</VirtualHost>

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.

<VirtualHost *>

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?

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

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



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.
6:19 pm on Aug 9, 2009 (gmt 0)

10+ Year Member




>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
 

Featured Threads

Hot Threads This Week

Hot Threads This Month