download - Best Apache Configuration -
download - Best Apache Configuration -
please, can help me best apache configuration
i own servers files download, download files direct links
ex: domain.com/files.rar
without programming or php function
the problem: having high load or stop servers
for can help me best apache configuration
such as: server limit max clients max requests per kid keep-alive keep-alive timeout max keep-alive requests etc.
my servers 4gb ram , hdd drives, , 100mb-ps , 1gbmb-ps
thanks.
separate static , dynamic content
use separate servers static , dynamic content. apache processes serving dynamic content carry overhead , swell size of content beingness served, never decreasing in size. each process incur size of loaded php or perl libraries. 6mb-30mb process size [or 10% of server's memory] not unusual, , becomes waist of resources serving static content.
for more efficient utilize of scheme memory, either utilize mod_proxy pass specific requests onto apache server, or utilize lightweight server handle static requests:
nginx lighttpd or utilize front-end caching proxy such squid-cache or varnish-cache
the server handling static content goes front.
note configuration settings quite different between dynamic content server , static content server. mod_deflate
reduce bandwidth 75% , improve response time using mod_deflate.
loadmodule deflate_module modules/mod_deflate.so <location /> addoutputfilterbytype deflate text/html text/plain text/css text/xml application/x-javascript </location>
loaded modules
reduce memory footprint loading required modules. advise statically compile in needed modules, on building dsos (dynamic shared objects). bad advice. need manually rebuild apache every time new version or security advisory module set out, creating more work, more build related headaches, , more downtime.
mod_expires
include mod_expires ability set expiration dates specific content; utilizing 'if-modified-since' header cache command sent user's browser/proxy. save bandwidth , drastically speed site [repeat] visitors.
note can implemented mod_headers.
keepalive
enable http persistent connections improve latency times , cut down server load [25% of original load not uncommon].
prefork mpm:
keepalive on keepalivetimeout 2 maxkeepaliverequests 100
worker , winnt mpms:
keepalive on keepalivetimeout 15 maxkeepaliverequests 100
with prefork mpm, recommended set 'keepalive' 'off'. otherwise, client tie entire process span of time. though in experience, more useful set 'keepalivetimeout' value low [2 seconds seems ideal value]. not problem worker mpm [thread-based], or under windows [which has thread-based winnt mpm].
with worker , winnt mpms, default 15 sec timeout setup maintain connection open next page request; improve handle client going link link. check logs see how long client remains on each page before moving on link. set value appropriately [do not set higher 60 seconds].
symlinks
make sure 'options +followsymlinks -symlinksifownermatch' set directories. otherwise, apache issue scheme phone call per filename component substantiate filename not symlink; , more scheme calls match owner.
<directory /> options followsymlinks </directory>
allowoverride
set default 'allowoverride none' filesystem. otherwise, given url path translation, apache effort observe .htaccess file under every directory level of given path.
<directory /> allowoverride none </directory>
extendedstatus
if mod_status included, create sure directive 'extendedstatus' set 'off'. otherwise, apache issue several time-related scheme calls on every request made.
extendedstatus off timeout
lower amount of time server wait before failing request. timeout 45
apache download downloading
Comments
Post a Comment