{"id":5917,"date":"2016-05-13T15:29:01","date_gmt":"2016-05-13T07:29:01","guid":{"rendered":"http:\/\/rmohan.com\/?p=5917"},"modified":"2016-05-13T15:29:01","modified_gmt":"2016-05-13T07:29:01","slug":"apache-performance-config","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5917","title":{"rendered":"Apache performance config"},"content":{"rendered":"<p>Apache performance config<\/p>\n<p>Now on all my Apache i always load this Apache config. It enabled some apache standard performance config for Apache as a good standard.<\/p>\n<p>KeepAlive. Gzip all transfer and local disk cache<\/p>\n<p>my \/etc\/httpd\/cond.f\/01.conf<\/p>\n<p>NameVirtualHost *:80<br \/>\nNameVirtualHost *:443<\/p>\n<p>#Speedning upp webres Apache config<\/p>\n<p># 2 HOURS<br \/>\n<FilesMatch \"\\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$\"><br \/>\nHeader set Cache-Control &#8220;max-age=7200, public&#8221;<br \/>\n<\/FilesMatch><br \/>\n# 1 HOUR<br \/>\n<FilesMatch \"\\.(xml|txt)$\"><br \/>\nHeader set Cache-Control &#8220;max-age=3600, public, must-revalidate&#8221;<br \/>\n<\/FilesMatch><br \/>\n# 2 HOURS<br \/>\n<FilesMatch \"\\.(html|htm)$\"><br \/>\nHeader set Cache-Control &#8220;max-age=7200, must-revalidate&#8221;<br \/>\n<\/FilesMatch><\/p>\n<p>#<br \/>\nKeepAlive On<\/p>\n<p>#<br \/>\n# MaxKeepAliveRequests: The maximum number of requests to allow<br \/>\n# during a persistent connection. Set to 0 to allow an unlimited amount.<br \/>\n# We recommend you leave this number high, for maximum performance.<br \/>\n#<br \/>\nMaxKeepAliveRequests 100<\/p>\n<p>#<br \/>\n# KeepAliveTimeout: Number of seconds to wait for the next request from the<br \/>\n# same client on the same connection.<br \/>\n#<br \/>\nKeepAliveTimeout 100<\/p>\n<p><ifModule mod_gzip.c><br \/>\nmod_gzip_on Yes<br \/>\nmod_gzip_dechunk Yes<br \/>\nmod_gzip_item_include file .(html?|txt|css|js|php|pl)$<br \/>\nmod_gzip_item_include handler ^cgi-script$<br \/>\nmod_gzip_item_include mime ^text\/.*<br \/>\nmod_gzip_item_include mime ^application\/x-javascript.*<br \/>\nmod_gzip_item_exclude mime ^image\/.*<br \/>\nmod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*<br \/>\n<\/ifModule><\/p>\n<p><IfModule mod_cache.c><br \/>\n#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.<\/p>\n<p><IfModule mod_disk_cache.c><br \/>\nCacheRoot \/tmp<br \/>\nCacheEnable disk \/<br \/>\nCacheDirLevels 5<br \/>\nCacheDirLength 3<br \/>\n<\/IfModule><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache performance config<\/p>\n<p>Now on all my Apache i always load this Apache config. It enabled some apache standard performance config for Apache as a good standard.<\/p>\n<p>KeepAlive. Gzip all transfer and local disk cache<\/p>\n<p>my \/etc\/httpd\/cond.f\/01.conf<\/p>\n<p>NameVirtualHost *:80 NameVirtualHost *:443<\/p>\n<p>#Speedning upp webres Apache config<\/p>\n<p># 2 HOURS Header set Cache-Control &#8220;max-age=7200, public&#8221; # [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5917"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5917"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5917\/revisions"}],"predecessor-version":[{"id":5918,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5917\/revisions\/5918"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}