Receiving error apr_socket_connect(): Invalid argument (22) when running apache bench (ab) on OSX

Solution 1:

On OSX, the fix is to use "http://127.0.0.1" instead of localhost. Not sure why, but that prevents the error.