Mac equivalent of /etc/nsswitch.conf for PHP chroot I've setup a chroot for my PHP server running behind nginx on mac.

It works except for any call to a CURL request fails with an error like cURL resource: Resource id #43; cURL error: Couldn't resolve host 's3.amazonaws.com'

Most guides to setting up a chroot environment say that you should map certain files to be available inside the chroot. The only file I can't find to map is /etc/nsswitch.conf which apparently doesn't exist on Mac.

What is the equivalent file on a Mac? Or what file/socket should be made available to the chroot environment to allow DNS lookups to work?
It turns out that on OSX the DNS lookup is done through the service mDNSResponder service which is running as a socket at /var/run/mDNSResponder.

It does not use /etc/nsswitch.conf or /etc/resolv.conf so there is no way of mapping those files into a chroot. Instead it's a better idea to use a localhost proxy.