You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Hayles, S." <sh...@leicester.ac.uk> on 2006/04/20 15:18:09 UTC

[users@httpd] Is per file configuration easily possible?

Hi

If I have an index.html in directory xxx that I want to be accessible
only from the yyy domain I know that I can use something like:

<Files index.html>
Order Deny,Allow
Deny from all
Allow from yyy
</Files>

in a .htaccess file or enclosed in <Directory xxx> ... </Directory> in
the main configuration. However, it will block access to every
index.html from this directory down, until told not to. To stop this
configuration from propagating down the directory tree, I need something
like:

<FilesMatch ".*">
Allow from all
</FilesMatch>

for all contained directories.

Is there any better way to associate configuration with a single file?

The reason I ask is that I'm porting an existing site developed using
Netscape/iPlanet/Sun serving software, where many directories contain
.nsconfig files to provide per file access control.

Thanks

Steven

---------------------------------------------------------------------
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] Is per file configuration easily possible?

Posted by "S.Hayles" <sh...@leicester.ac.uk>.
On Fri, 21 Apr 2006, Alexey Polyakov wrote:

> Well, you always have mod_rewrite as a last resort.

I really hadn't considered to looking at mod_rewrite for access control, 
but it is documented: 
http://httpd.apache.org/docs/2.2/howto/access.html#rewrite
http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html#access

> But if you're able to put stuff in httpd.conf, it's always better,
> cause it gives better performance.

Unfortunately, we have 600 accounts controlling different parts of the 
site, so I need to delegate some control.

Thanks

Steven

---------------------------------------------------------------------
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] Is per file configuration easily possible?

Posted by Alexey Polyakov <al...@gmail.com>.
On 4/21/06, S.Hayles <sh...@leicester.ac.uk> wrote:

> Thanks, I hadn't considered that. Not possible in .htaccess files, of
> course.

Well, you always have mod_rewrite as a last resort.
But if you're able to put stuff in httpd.conf, it's always better,
cause it gives better performance.


--
Alexey Polyakov

---------------------------------------------------------------------
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] Is per file configuration easily possible?

Posted by "S.Hayles" <sh...@leicester.ac.uk>.
On Fri, 21 Apr 2006, Alexey Polyakov wrote:

> On 4/20/06, Hayles, S. <sh...@leicester.ac.uk> wrote:
>
>> Is there any better way to associate configuration with a single file?
>
> <Location /dir/index.html>
> ...
> </Location>
> looks like a better solution.

Thanks, I hadn't considered that. Not possible in .htaccess files, of 
course.

Steven

---------------------------------------------------------------------
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] Is per file configuration easily possible?

Posted by Alexey Polyakov <al...@gmail.com>.
On 4/20/06, Hayles, S. <sh...@leicester.ac.uk> wrote:

> Is there any better way to associate configuration with a single file?

<Location /dir/index.html>
...
</Location>
looks like a better solution.

--
Alexey Polyakov

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