You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Res <re...@ausics.net> on 2008/05/01 08:53:14 UTC
apache mod_dbd/htaccess
Hi,
I have a request for a feature in Apache.
Basically I was wondering if it could include the ability to use
AuthBasicProvider, AuthDBDUserPWQuery etc in a .htaccess file, like we
can place in a directory block.
Perhaps this was already looked at and discarded as a serious performance
impact? We are looking at our members section, which is in its own vhost
block, to provide members with database capability for access to a protected
directory (this is actually for minors to protect any profiles/pics they
put up on home pages, they restrict this information to their friends
where they can add/delete user/pass pairs for whoever they want to view
it), we are running one database and a table per user.
AuthDBDUserPWQuery "SELECT pass FROM <members_name> WHERE user = %s"
htaccess denies me to do this, I am aware of the impact in activating
htaccess, but as you can imagine doing this for a lot of members has the
potential to see a very large httpd.conf if we do it all in special
directory blocks.
Perhaps this is a non-issue and it matters not how big the conf file is, well,
so long as we have the memory I suppose.
So could I request this feature, if not found to be a resource problem, to
be included in a future Apache release?
Thanks
Res
Re: apache mod_dbd/htaccess (SUP)
Posted by Res <re...@ausics.net>.
Hi Nick,
On Fri, 2 May 2008, Nick Kew wrote:
> Can you devise a single statement you could set at top-level for
> all your hosts? Perhaps with the hostname as an argument to
> the SQL query.
> If that doesn't work as-is, then a fix to that would seem a good
> enhancement request.
I might be missing something, but I've tried many combinations, the best
would be: (all non relevant lines ommited)...
<Directory /var/www/members/*/secure>
AuthDBDUserRealmQuery "SELECT pass FROM blah WHERE user = %s and
realm = %s
Require valid-user
...
Of course this match any ol bugger, it would be nice to extend this so
that perhaps a %*% could be used in the directory statement? This would
say match up with the realm, so... an attempt to login as foo@bar, being
user foo logging into user bars protected directory would see:
<Directory /var/www/members/%*%/secure>
AuthDBDUserRealmQuery "SELECT pass FROM blah WHERE user = %s and
realm = %s
and be read as in this case as authenticate foo to enter
/var/www/members/bar/secure ... if you know what I mean.
--
Cheers
Res
I read usenet and lists in pine. But m$ outlook, thunderbird and gmail
often use html span/whatever for quotes, makes it hard to tell who said
what, so I dont try. If I ignore you, thats why! Use a compliant mailer.
Re: apache mod_dbd/htaccess (SUP)
Posted by Nick Kew <ni...@webthing.com>.
On Fri, 2 May 2008 09:04:27 +1000 (EST)
Res <re...@ausics.net> wrote:
> On Fri, 2 May 2008, Res wrote:
>
> > So what would be the impact to having a very large httpd.conf file,
> > having to read in, perhaps many thousands of extra directory blocks?
> > If only 100 or 1000 want it thats fine, but if i end up with 10+K
> > wanting it, I would like to know what impact I may expect, what
> > would be the
>
>
> I should have also stated here I have up to 900 other vhosts on this
> same server, their usage is so small I cant justify putting them on
> another box the reason we have members on this one is so the darn box
> actually does some work :)
Can you devise a single statement you could set at top-level for
all your hosts? Perhaps with the hostname as an argument to
the SQL query.
If that doesn't work as-is, then a fix to that would seem a good
enhancement request.
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/
Re: apache mod_dbd/htaccess (SUP)
Posted by Res <re...@ausics.net>.
On Fri, 2 May 2008, Res wrote:
> So what would be the impact to having a very large httpd.conf file,
> having to read in, perhaps many thousands of extra directory blocks?
> If only 100 or 1000 want it thats fine, but if i end up with 10+K
> wanting it, I would like to know what impact I may expect, what would be the
I should have also stated here I have up to 900 other vhosts on this same
server, their usage is so small I cant justify putting them on another box
the reason we have members on this one is so the darn box actually does
some work :)
--
Cheers
Res
I read usenet and lists in pine. But m$ outlook, thunderbird and gmail
often use html span/whatever for quotes, makes it hard to tell who said
what, so I dont try. If I ignore you, thats why! Use a compliant mailer.
Re: apache mod_dbd/htaccess
Posted by Graham Leggett <mi...@sharp.fm>.
Res wrote:
> So what would be the impact to having a very large httpd.conf file,
> having to read in, perhaps many thousands of extra directory blocks?
> If only 100 or 1000 want it thats fine, but if i end up with 10+K
> wanting it, I would like to know what impact I may expect, what would be
> the memory use for each additional directory block?
I think the best way to check is to try create a very large httpd file
like this pointing at some test directories and see. How fast this will
be will depend largely on your environment I would think.
Regards,
Graham
--
Re: apache mod_dbd/htaccess
Posted by Res <re...@ausics.net>.
On Thu, 1 May 2008, Nick Kew wrote:
>> Basically I was wondering if it could include the ability to use
>> AuthBasicProvider, AuthDBDUserPWQuery etc in a .htaccess file, like
>> we can place in a directory block.
>
> Isn't the documentation clear about this? Hmmm, I'm sure I
> wrote something, but it's not in the primary docs.
Correct, nothing found, I do actually get off my ass and reserach
what I can first.
>
So what would be the impact to having a very large httpd.conf file,
having to read in, perhaps many thousands of extra directory blocks?
If only 100 or 1000 want it thats fine, but if i end up with 10+K
wanting it, I would like to know what impact I may expect, what would be
the memory use for each additional directory block? As from what I can
tell the only issue would I'd run into is memory related, and maybe taking
a little bit longer to start whislt reading in the conf files (the vhosts
are (and members will also be)) separate included files anyway to keep
things a bit tidy.
Or perhaps I just use the old flatfile method, and tolerate any slowness
it causes.. But if we can have our CRM do it, it avoids staff wasting
their time :)
--
Cheers
Res
I read usenet and lists in pine. But m$ outlook, thunderbird and gmail
often use html span/whatever for quotes, makes it hard to tell who said
what, so I dont try. If I ignore you, thats why! Use a compliant mailer.
Looping in sendfile_it_all
Posted by Niko Wilfritz Sianipar Sianipar <ni...@yahoo.co.id>.
What is the condition in sendfile_it_all (core_filters.c) that makes the looping running more than once? Cause I've made modified it where for the first loop I only send 4096 Byte of the file (to estimate the throughput) and for the next looping I send the others of the file (file size minus 4096 byte). But after I test with my browser, the browser only show the 4096 Byte of the file I requested. Where is the other byte??
Thank you
Best,
Niko Wilfritz Sianipar
Teknik Informatika IT Telkom Bandung
---------------------------------
Bergabunglah dengan orang-orang yang berwawasan, di bidang Anda di Yahoo! Answers
Re: Apache response time
Posted by Joshua Slive <jo...@slive.ca>.
2008/5/4 Niko Wilfritz Sianipar Sianipar <ni...@yahoo.co.id>:
> How to get the response time in the apache log file in msec. Thank you.
%D in the logformat string gives you microseconds.
Joshua.
Apache response time
Posted by Niko Wilfritz Sianipar Sianipar <ni...@yahoo.co.id>.
How to get the response time in the apache log file in msec. Thank you.
Best,
Niko Wilfritz Sianipar
Teknik Informatika IT Telkom Bandung
---------------------------------
Kunjungi halaman depan Yahoo! Indonesia yang baru!
Re: apache mod_dbd/htaccess
Posted by Nick Kew <ni...@webthing.com>.
On Thu, 1 May 2008 16:53:14 +1000 (EST)
Res <re...@ausics.net> wrote:
> Hi,
>
> I have a request for a feature in Apache.
>
> Basically I was wondering if it could include the ability to use
> AuthBasicProvider, AuthDBDUserPWQuery etc in a .htaccess file, like
> we can place in a directory block.
Isn't the documentation clear about this? Hmmm, I'm sure I
wrote something, but it's not in the primary docs.
> Perhaps this was already looked at and discarded as a serious
> performance impact?
That's the lesser of two reasons. The more important one is
that it introduces a whole new raft of security issues:
* malicious users introducing SQL injection attacks through htaccess
* naive users opening the way to ditto
Then there's the problem that combines both the above:
Prepared Statement implementations vary widely across database
engines, and in some cases are not good for once-only use.
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/