April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Apache performance config

Apache performance config

Now on all my Apache i always load this Apache config. It enabled some apache standard performance config for Apache as a good standard.

KeepAlive. Gzip all transfer and local disk cache

my /etc/httpd/cond.f/01.conf

NameVirtualHost *:80
NameVirtualHost *:443

#Speedning upp webres Apache config

# 2 HOURS

Header set Cache-Control “max-age=7200, public”

# 1 HOUR

Header set Cache-Control “max-age=3600, public, must-revalidate”

# 2 HOURS

Header set Cache-Control “max-age=7200, must-revalidate”

#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 100


mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*


#LoadModule disk_cache_module modules/mod_disk_cache.so # If you want to use mod_disk_cache instead of mod_mem_cache, # uncomment the line above and comment out the LoadModule line below.


CacheRoot /tmp
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>