brew install nginx
sudo cp /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist /Library/LaunchAgents
Replace /usr/local/etc/nginx/nginx.conf
with the nginx.conf
in this gist. I'm using port 5000 for my current project. Obviously, change server_name
as well, and probably the name of its access log.
sudo launchctl load /Library/LaunchAgents/homebrew.mxcl.nginx.plist
I copied this exactly, yet I'm always getting 502: Bad Gateway.
Any ideas what I might be doing wrong?
error.log:
2017/02/27 21:21:26 [error] 12186#0: *1 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: dev.mydevdomain.tv, request: "GET /favicon.ico HTTP/1.1", upstream: "http://0.0.0.0:5000/favicon.ico", host: "dev.mydevdomain.tv", referrer: "http://dev.mydevdomain.tv/"