fix for nginx on osx
aled's comments addressed
Merge pull request #532 from andreaturli/nginx

fix for nginx on osx