Sep 102009
 

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.

Sep 052009
 

Due to the nature of the SSL layer in HTTPS, negotiating a secure connection happens before the HTTP protocol is initiated. That means that at the time the SSL layer is in play, the “Host” header has not been sent and, therefore, apache cannot determine which NameVirtualHost to use.

If you’re self-signing your certificates, the browser is going to throw a warning anyway. Might as well just make it as generic as possible and then all traffic running on through the HTTPS port will share the same certificate.