I'm running this on OSX, and trying to connect to the host-only IP in the Vagrant file through Chrome.
In my Vagrant file i have this line: config.vm.network :hostonly, "33.33.33.33"
I am trying to run an nginx server on the VM, and see the server on Chrome by going to http://33.33.33.33
My nginx configuration looks like this:
server {
location / {
proxy_pass http://127.0.0.1:2222;
}
}
I am running a web server using gunicorn using this command: gunicorn app:app -b localhost:8000
When I navigate to the host-only IP, I get a connection failed error in chrome. If i change the gunicorn command to gunicorn app:app -b localhost:2222, it works. Why does port 8000 show a connection error?
From nginx logs:
2013/07/16 16:52:39 [error] 1748#0: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 33.33.33.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:2222/favicon.ico", host: "33.33.33.33"
Thanks!