Show Apache / httpd memory usage and process size

ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'

thanks S.G. Vulcan

Limit Apache gzip deflate to certain files

Particularly useful if you have some other server-side process that already compresses files and/or are using nginx or similar to compress some files, this technique can be used to pick up any one-offs or static files that you want to compress prior to caching, e.g., via Varnish, which supports gzip’d files but doesn’t do the compression.

1
2
3
<Directory "/PATH/TO/STATIC/ASSETS">
	AddOutputFilterByType DEFLATE text/css text/javascript application/javascript
</Directory>