# How-to point AWS hosted Nginx to reverse proxy to fly.io application?

**URL:** <https://community.fly.io/t/how-to-point-aws-hosted-nginx-to-reverse-proxy-to-fly-io-application/15714>\
**Category:** Questions / Help\
**Tags:** login-only\
**Created:** [October 2, 2023, 9:20am UTC](https://community.fly.io/t/how-to-point-aws-hosted-nginx-to-reverse-proxy-to-fly-io-application/15714 "2023-10-02T09:20:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivolution](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/ivolution/32/15280_2.png) [@ivolution](https://community.fly.io/u/ivolution)\
**Post date:** [October 2, 2023, 9:20am UTC](https://community.fly.io/t/how-to-point-aws-hosted-nginx-to-reverse-proxy-to-fly-io-application/15714/1 "2023-10-02T09:20:32Z")

</div>

[domain.com](http://domain.com) with SSL hosted on AWS EC2 + Route 53 DNS

EC2 runs Nginx and reverse proxies to multiple upstream NodeJS applications hosted on the same EC2 server

`location /` currently points to [http://site](http://site) another NodeJS applications, which I am currently moving to [Fly.io](http://Fly.io) with reserved IP `1.1.1.1` and internal url `site.internal`

```auto
location / {
    proxy_pass http://site;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }

```

What should I do to have the Nginx load the [fly.io](http://fly.io) application?

Thanks!

---

<div class="post-metadata">

**Author:** ![brian](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/brian/32/15488_2.png) [@brian](https://community.fly.io/u/brian)\
**Post date:** [October 3, 2023, 8:21am UTC](https://community.fly.io/t/how-to-point-aws-hosted-nginx-to-reverse-proxy-to-fly-io-application/15714/2 "2023-10-03T08:21:35Z")

</div>

Not sure if i’m misunderstanding, but I think you could use https://\<APP\_NAME\>.fly.dev once you know what \<APP\_NAME\> is. Have you tested that out?

---

<div class="post-metadata">

**Author:** ![ivolution](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/ivolution/32/15280_2.png) [@ivolution](https://community.fly.io/u/ivolution)\
**Post date:** [October 3, 2023, 1:49pm UTC](https://community.fly.io/t/how-to-point-aws-hosted-nginx-to-reverse-proxy-to-fly-io-application/15714/3 "2023-10-03T13:49:28Z")

</div>

The `https://<APP_NAME>.fly.dev`, but I wonder why the `https://IP` doesn’t work if I have a reserved IP?

---

<div class="post-metadata">

**Author:** ![brian](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/brian/32/15488_2.png) [@brian](https://community.fly.io/u/brian)\
**Post date:** [October 3, 2023, 11:30pm UTC](https://community.fly.io/t/how-to-point-aws-hosted-nginx-to-reverse-proxy-to-fly-io-application/15714/4 "2023-10-03T23:30:52Z")

</div>

I think https://\<IP\_ADDRESS\> definitely wouldn’t work because the SSL cert isn’t issued for the IP address. I haven’t seen anyone try http://\<IP\_ADDRESS\> for the public proxy, not sure if it’s configured to understand that. Is there a reason why you want to avoid \<APP\_NAME\>.fly.dev or another custom domain?

---

<div class="post-metadata">

**Author:** ![catflydotio](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/catflydotio/32/14559_2.png) [@catflydotio](https://community.fly.io/u/catflydotio)\
**Post date:** [April 27, 2024, 1:00am UTC](https://community.fly.io/t/how-to-point-aws-hosted-nginx-to-reverse-proxy-to-fly-io-application/15714/5 "2024-04-27T01:00:30Z")

</div>

From #How To to #Questions / Help

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [May 4, 2024, 1:00am UTC](https://community.fly.io/t/how-to-point-aws-hosted-nginx-to-reverse-proxy-to-fly-io-application/15714/6 "2024-05-04T01:00:43Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
