Apache stress test

Apache includes a very useful tool for hammering the server. It’s called Apache Benchmark “ab” is the binary’s name and it can really hand a server it’s own ass if you don’t watch it.


$ ab -kc 10 -t 30 http://localhost/

That will open 10 connections, use Keep-Alive on them, and then hammer localhost for 30 seconds through those connections. When done,  you get a pretty little chart telling you what broke and how long it took to start screaming. you can increase number of connections or the duration time.

For best results, use it from another machine. You want to not only test the network connection but also leave the server’s CPU and OS to think about serving, not about pulling it down as well.

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark


self-signed wildcard SSL certificate

Creating certificate change kutukupret.com to whatever your domain name is


# mkdir /usr/share/ssl/certs/hostname.kutukupret.com
# cd /usr/share/ssl/certs/hostname.kutukupret.com
(umask 077 && touch host.key host.cert host.info host.pem)
# openssl genrsa 2048 > host.key
# openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
...[enter *.kutukupret.com for the Common Name]...
# openssl x509 -noout -fingerprint -text < host.cert > host.info
# cat host.cert host.key > host.pem
# chmod 400 host.key host.pem

In apache

SSLEngine on
SSLCertificateFile /path/to/host.cert
SSLCertificateKeyFile /path/to/host.key
SSLProtocol all
SSLCipherSuite HIGH:MEDIUM

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark


Page 1 of 3123