You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ha...@daedalos.de on 2002/01/09 11:54:04 UTC

Complex Access Control

Hi,

here is a problem that looks so common to me that I believe there must be pre-fab solution, but I found none.

Let's say you have a web site with some (static) content. Now most of this content is only valid from a given start date to and end date. The dates are stored in a database. I want to configure Apache so whenever a URL is requested, it checks (via a servlet) whether the given URL contains currently valid contents. If it is, it serves the request. Otherwise, an HTTP error is returned. What is the simplest way to do that with Apache?

Some remarks to the problem:

(1) The site admins need to manipulate invalid contents, so I do need to be able to put content into my doc root before it becomes valid, and to leave it there after it became invalid. So simply deleting invalid contents is not possible.

(2) The actual access checks could be more complex than just checking for dates. Also, I already have an app server running, so using a servlet to do the checks would fit nicely in the overall picture.

Hasko Heinecke
Daedalos Consulting AG, Zürich

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Complex Access Control

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Hasko.Heinecke@daedalos.de wrote:
> 
> Thanks for the pointer. However, the start and end dates
> can change, and they are different for each file. There are
> several thousand files. So mod_sequester doesn't work for my problem

A little work and you could probably have it pull those bits
from the database.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Complex Access Control

Posted by Ha...@daedalos.de.
Ken wrote:
> Hasko.Heinecke@daedalos.de wrote:
> > 
> > Let's say you have a web site with some (static) content.
> > Now most of this content is only valid from a given start
> > date to and end date. The dates are stored in a database.
> 
> Aside from the database part (which you could work around with a
> script that rewrites the .htaccess files), check out mod_sequester
> at <URL:http://MeepZor.Com/packages/mod_sequester/>.

Thanks for the pointer. However, the start and end dates can change, and they are different for each file. There are several thousand files. So mod_sequester doesn't work for my problem -- it would require to change the web server configuration often and also the configuration file would explode.

Hasko

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Complex Access Control

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Hasko.Heinecke@daedalos.de wrote:
> 
> Let's say you have a web site with some (static) content.
> Now most of this content is only valid from a given start
> date to and end date. The dates are stored in a database.

Aside from the database part (which you could work around with a
script that rewrites the .htaccess files), check out mod_sequester
at <URL:http://MeepZor.Com/packages/mod_sequester/>.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org