# HTTP response at port 80

**URL:** <https://discourse.nodered.org/t/http-response-at-port-80/93348>\
**Category:** General\
**Tags:** http-request\
**Created:** [22 November 2024 10:46 UTC](https://discourse.nodered.org/t/http-response-at-port-80/93348 "2024-11-22T10:46:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JesFo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jesfo/32/50735_2.png) [@JesFo](https://discourse.nodered.org/u/JesFo)\
**Post date:** [22 November 2024 10:46 UTC](https://discourse.nodered.org/t/http-response-at-port-80/93348/1 "2024-11-22T10:46:04Z")

</div>

I'm trying to serve a webpage following this tutorial: [Create an HTTP Endpoint : Node-RED](https://cookbook.nodered.org/http/create-an-http-endpoint)  
And it works fine, but I'm looking for a way to serve the endpoint on port 80, without having to change NodeRED's dashboard port (1880).  
I'm running NodeRED on Ubuntu Server, and I have allowed the NodeRED service to utilize ports below 1024 with: `sudo setcap 'cap_net_bind_service=+ep'`. I've heard of adding a NodeJS endpoint like so:

```auto
httpNode: {
        port: 80
    },

```

But so far I'm stuck trying to get this to work without a reverse proxy.  
Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [22 November 2024 10:55 UTC](https://discourse.nodered.org/t/http-response-at-port-80/93348/2 "2024-11-22T10:55:25Z")

</div>

> [@JesFo](#):
>
> But so far I'm stuck trying to get this to work without a reverse proxy.

It is probably far easier (and better) to simply spin up something like HAProxy to direct traffic from port 80 to 1880.

Question: why it it necessary? Cant you just set whatever uses the endpoint to use port 1880?

Also, I expect you will be exposing this to the internet? In which case, something HAProxy or NGINX or similar is definitely the better way to go.

---

<div class="post-metadata">

**Author:** ![JesFo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jesfo/32/50735_2.png) [@JesFo](https://discourse.nodered.org/u/JesFo)\
**Post date:** [22 November 2024 11:19 UTC](https://discourse.nodered.org/t/http-response-at-port-80/93348/3 "2024-11-22T11:19:31Z")

</div>

Won't a reverse proxy redirect to the dashboard if given no subpath in the url?

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [23 November 2024 08:23 UTC](https://discourse.nodered.org/t/http-response-at-port-80/93348/4 "2024-11-23T08:23:52Z")

</div>

> [@JesFo](#):
>
> Won't a reverse proxy redirect to the dashboard if given no subpath in the url

Use two separate domains:

[nodered.fubar.com:80](http://nodered.fubar.com:80) -- proxy --\> nodered.server:1880  
[dashboard.fubar.com:80](http://dashboard.fubar.com:80) -- proxy --\> nodered.server:2880

or you could also setup a second port on your proxy if you're using a single domain.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 February 2025 08:24 UTC](https://discourse.nodered.org/t/http-response-at-port-80/93348/5 "2025-02-21T08:24:06Z")

</div>

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