You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Leon Sargent <le...@comcast.net> on 2006/09/06 20:15:53 UTC

[users@httpd] Verifying Apapche httpd.conf and other files one piece at a time as requested/

This is the first part of my httpd.conf file.

# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
     Options FollowSymLinks
     AllowOverride None
</Directory>

Will this code override this code in my .htaccess file?

AllowOverride AuthConfig
AuthUserFile lhsmarkets.com/Library/WebServer/Documents/.htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
Options +FollowSymLinks
RewriteEngine On
RewriteBase /Documents/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&% 
{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&% 
{QUERY_STRING}

Leon

---------------------------------------------------------------------
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] Verifying Apapche httpd.conf and other files one piece at a time as requested/

Posted by Leon Sargent <le...@comcast.net>.
On Sep 6, 2006, at 2:30 PM, Joshua Slive wrote:

> 2. You should probably just avoid .htaccess entirely.  As the
> .htaccess tutorial explains, anything that can be done inside
> .htaccess can also be done in a <Directory> section in httpd.conf.  So
> just use httpd.conf and everything is simpler (no need to bother with
> AllowOverride) and faster (the .htaccess files don't need to be read
> on every request).


Okay thank you for that very helpful information.

I did not know that using the directives i did not need .htaccess and  
that it slow down the server process by reading the .htaccess file  
each time.

That is good advice.

Thank you.

Leon

---------------------------------------------------------------------
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] Verifying Apapche httpd.conf and other files one piece at a time as requested/

Posted by Joshua Slive <jo...@slive.ca>.
On 9/6/06, Leon Sargent <le...@comcast.net> wrote:
> This is the first part of my httpd.conf file.
>
> # First, we configure the "default" to be a very restrictive set of
> # permissions.
> #
> <Directory />
>      Options FollowSymLinks
>      AllowOverride None
> </Directory>
>
> Will this code override this code in my .htaccess file?
>
> AllowOverride AuthConfig
> AuthUserFile lhsmarkets.com/Library/WebServer/Documents/.htpasswd
> AuthGroupFile /dev/null
> AuthName "Password Protected Area"
> AuthType Basic
> Options +FollowSymLinks
> RewriteEngine On
> RewriteBase /Documents/
> RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%
> {QUERY_STRING}
> RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
> RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%
> {QUERY_STRING}

I don't really know what you mean by "override this code".  Setting
AllowOverride to None will indeed turn off processing of .htaccess
files.  But you likely have another AllowOverride directive in a
different part of httpd.conf that turns AllowOverride back on for
certain parts of the filesystem.  So assuming that the directory
containing the .htaccess is covered by an AllowOverride all, then the
.htaccess will be read.

Two other things:
1. You can't put AllowOverride inside an .htaccess.  It makes no sense
to control .htaccess reading from inside an .htaccess file.

2. You should probably just avoid .htaccess entirely.  As the
.htaccess tutorial explains, anything that can be done inside
.htaccess can also be done in a <Directory> section in httpd.conf.  So
just use httpd.conf and everything is simpler (no need to bother with
AllowOverride) and faster (the .htaccess files don't need to be read
on every request).

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