Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -e
if test "$RS_REBOOT" = "true" ; then
echo "Skip HTTPD install on reboot."
logger -t RightScale "Skip nginx install on reboot."
service nginx start
exit 0 # Leave with a smile ...
fi
# I recently switched one of my Rails applications from Litespeed to Apache+Passenger
# with nginx on the frontend to handle static file requests. nginx proxies all non-static
# file requests to Apache+Passenger. I use page caching extensively, so that is why I
# need fast static file serving.
#
# I ran some quick tests comparing static file serving of Litespeed, Apache, and nginx.
# Here are the results:
#
# nginx 4400 requests/second
# Apache 2900 requests/second