Skip to content

Instantly share code, notes, and snippets.

@mcculloughsean
Forked from remear/gist:1724911
Created March 13, 2012 05:30
Show Gist options
  • Save mcculloughsean/2027012 to your computer and use it in GitHub Desktop.
Save mcculloughsean/2027012 to your computer and use it in GitHub Desktop.
Fixing Apachebench on OS X Lion
# If you're getting this error trying to use ApacheBench on OS X Lion:
# Benchmarking mwmanning.com (be patient)...apr_socket_recv: Connection reset by peer (54)
#
# You need to download the latest beta version of Apache and rebuild ab.
# Here's how (assuming you have homebrew installed).
# Install Homebrew (https://github.com/mxcl/homebrew) and then the Perl Regex support
brew install pcre
# Download the latest from http://httpd.apache.org/download.cgi, then decompress and compile it
curl -O http://apache.mirrors.pair.com//httpd/httpd-2.4.1.tar.gz
tar -zxvf httpd-2.4.1.tar.gz
cd httpd-2.4.1
./configure
make
# backup the original 'ab' command and replace it for the new one
sudo mv /usr/sbin/ab /usr/sbin/ab.old
sudo cp support/ab /usr/sbin/ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment