# Nginx reverse proxy

**URL:** <https://forums.balena.io/t/nginx-reverse-proxy/2529>\
**Category:** Product support\
**Created:** [February 8, 2018, 11:30pm UTC](https://forums.balena.io/t/nginx-reverse-proxy/2529 "2018-02-08T23:30:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CWright017](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/cwright017/32/753_2.png) [@CWright017](https://forums.balena.io/u/CWright017)\
**Post date:** [February 8, 2018, 11:30pm UTC](https://forums.balena.io/t/nginx-reverse-proxy/2529/1 "2018-02-08T23:30:28Z")

</div>

I have an express server running on port 3001, I then have an nginx reverse proxy set up with the config:

```auto
server {
	listen 80;
	location / {
		proxy_pass http://localhost:3001;
	}
}

```

but when accessing my resin public url - I just get the resin error.

I’ve tried this setup on my local machine and it’s fine. I thought maybe resin just didn’t allow multiple ports to listen - but I can use express to proxy my requests to other express apps ( but I’d rather use nginx ).

---

<div class="post-metadata">

**Author:** ![shaunmulligan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/shaunmulligan/32/34_2.png) [@shaunmulligan](https://forums.balena.io/u/shaunmulligan)\
**Post date:** [February 9, 2018, 3:40pm UTC](https://forums.balena.io/t/nginx-reverse-proxy/2529/2 "2018-02-09T15:40:45Z")

</div>

Hey @CWright017, I don’t have much experience with nginx, but I was wondering if maybe for some reason `localhost` doesn’t resolve properly with in the container, have you tried something like `0.0.0.0` aswell?

---

<div class="post-metadata">

**Author:** ![jason10](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jason10/32/1464_2.png) [@jason10](https://forums.balena.io/u/jason10)\
**Post date:** [February 20, 2019, 1:13pm UTC](https://forums.balena.io/t/nginx-reverse-proxy/2529/3 "2019-02-20T13:13:53Z")

</div>

What does your docker-compose.yml contain? Is port 80 on the nginx container "expose"d and “port” mapped from 80 to 80?
