You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dan Lyons <Da...@cs.oag.state.tx.us> on 2005/07/14 17:04:56 UTC

[users@httpd] Apache trying to find .htaccess on VirtualHost's DocumentRoot

We have Apache running on a win2k server, with a mapped drive to a
directory on a Sun server(also running Apache).  Using VirtualHost, we
have made the mapped drive our document root to the network shared
drive:
 
<VirtualHost ourDNSname:80>
 ServerAdmin ouradmin@our.address
 DocumentRoot H:
 ServerName ourDNSname
  <Directory "H:\">
   AllowOverride None
   order allow,deny
   allow from all
  </Directory>
</VirtualHost>
 
....However, whenever we go to http://ourDNSname/anydirectory we get a
403-Forbidden error.  In error.log I get the error:
 
<date time> [crit] [client ipaddress] (22)Invalid Argument:
h:/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is
readable
 
I am a novice where Apache and configuring httpd.conf is concerned, but
I was under the impression that "AllowOverride None" would cause Apache
to not look for .htaccess, which in any case is not there.  Can anyone
recommend any solution to keep Apache from looking for a .htaccess
file?
 
regards,
Daniel

Re: [users@httpd] Apache trying to find .htaccess on VirtualHost's DocumentRoot

Posted by Joshua Slive <js...@gmail.com>.
On 7/14/05, Dan Lyons <Da...@cs.oag.state.tx.us> wrote:
>  
> We have Apache running on a win2k server, with a mapped drive to a directory
> on a Sun server(also running Apache).  Using VirtualHost, we have made the
> mapped drive our document root to the network shared drive: 
>   
> <VirtualHost ourDNSname:80> 
>  ServerAdmin ouradmin@our.address 
>  DocumentRoot H: 
>  ServerName ourDNSname 
>   <Directory "H:\"> 
>    AllowOverride None 
>    order allow,deny 
>    allow from all 
>   </Directory> 
> </VirtualHost> 
>   
> ....However, whenever we go to http://ourDNSname/anydirectory we get a
> 403-Forbidden error.  In error.log I get the error: 
>   
> <date time> [crit] [client ipaddress] (22)Invalid Argument: h:/.htaccess
> pcfg_openfile: unable to check htaccess file, ensure it is readable 
>   
> I am a novice where Apache and configuring httpd.conf is concerned, but I
> was under the impression that "AllowOverride None" would cause Apache to not
> look for .htaccess, which in any case is not there.  Can anyone recommend
> any solution to keep Apache from looking for a .htaccess file? 

Your base assumption is correct.  Apache won't check for .htaccess
when AllowOverride is none.  I'm not sure what the exact problem here
is, but as a first guess I would use forward-slashes instead of
back-slashes in all pathnames: H:/.

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 trying to find .htaccess on VirtualHost's DocumentRoot

Posted by Craig Dunigan <cd...@doit.wisc.edu>.
Dan,

I haven't stopped to research any of this, but some shots in the dark:  

Are you sure the problem isn't that Apache can't find H:, not that it just can't
find .htaccess?  I have to say I don't like the look of a path in httpd.conf of
just "H:" without slashes.  Even if that's okay, it could be that the apache
user can't read the mounted drive for some reason (usually permissions).  By the
way, in terms of httpd.conf syntax, I believe paths are expressed with forward
slashes, regardless of OS, so I also don't like the looks of "H:\" in your
Directory block.  But maybe I'm just in a mood where I don't like anything that 
looks Microsoft-y.  ;)

--
Craig Dunigan
IS Technical Services Specialist (I don't know what it means, either)
Middleware - Enterprise Info Systems - Department of Info Technology
University of Wisconsin, Madison
                                                                                          
opinions expressed are my own, not the University's
                                                                                          

On Thu, 14 Jul 2005, Dan Lyons wrote:

> We have Apache running on a win2k server, with a mapped drive to a
> directory on a Sun server(also running Apache).  Using VirtualHost, we
> have made the mapped drive our document root to the network shared
> drive:
>  
> <VirtualHost ourDNSname:80>
>  ServerAdmin ouradmin@our.address
>  DocumentRoot H:
>  ServerName ourDNSname
>   <Directory "H:\">
>    AllowOverride None
>    order allow,deny
>    allow from all
>   </Directory>
> </VirtualHost>
>  
> ....However, whenever we go to http://ourDNSname/anydirectory we get a
> 403-Forbidden error.  In error.log I get the error:
>  
> <date time> [crit] [client ipaddress] (22)Invalid Argument:
> h:/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is
> readable
>  
> I am a novice where Apache and configuring httpd.conf is concerned, but
> I was under the impression that "AllowOverride None" would cause Apache
> to not look for .htaccess, which in any case is not there.  Can anyone
> recommend any solution to keep Apache from looking for a .htaccess
> file?
>  
> regards,
> Daniel
> 


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