logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to set the MaxRanges at httpd.conf?
Author
maskego



Joined: 16 Apr 2010
Posts: 238

PostPosted: Sat 17 Sep '11 10:31    Post subject: Re: Apache 2.2.21 released Reply with quote

How to set the MaxRanges at httpd.conf?
Or it no need to set at httpd.conf?Rolling Eyes


Steffen wrote:


MaxRanges:
The MaxRanges directive limits the number of HTTP ranges the server is willing to return to the client. If more ranges then permitted are requested, the complete resource is returned instead.
It is included now in the shipped httpd.conf and is using the default of 200.


Steffen
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 17 Sep '11 10:36    Post subject: Reply with quote

maskego, see "Context?
http://httpd.apache.org/docs/2.2/mod/core.html#maxranges

"server config, virtual host, directory"

That tells us it can be server wide, or per vhost, or directory, or some combination of all Smile
Back to top
maskego



Joined: 16 Apr 2010
Posts: 238

PostPosted: Sat 17 Sep '11 13:50    Post subject: Reply with quote

gl:

Do you know what number-of-ranges should be the best setting for DOS attack?Laughing 200 or less?


glsmith wrote:
maskego, see "Context?
http://httpd.apache.org/docs/2.2/mod/core.html#maxranges

"server config, virtual host, directory"

That tells us it can be server wide, or per vhost, or directory, or some combination of all Smile
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sun 18 Sep '11 1:12    Post subject: Reply with quote

Well, if there is any funny business going on in the request, or the request goes beyond that limit set, from my reading, it will just send the entire document. I do not think there is a DOS vector there any longer, even with a thousand ranges.

The problem as I understood it was for every range, there was a bucket copy. Too many of these, and the machine ran out of RAM. Now, duplicates are merged into one. Gaps under 80k are simply ignored and the two ranges with the gap between become one.

200 should be a safe default. But, if that gives you problems, lower it. The one thing about it is, it will not send an error to the browser, instead will just send the entire document.

I split this thread off of the announcement for 2.2.21, no need to pollute that with this.
Back to top


Reply to topic   Topic: How to set the MaxRanges at httpd.conf? View previous topic :: View next topic
Post new topic   Forum Index -> Apache