# Reverse proxy + npm \[Jul 17\]

**URL:** <https://community.nocodb.com/t/reverse-proxy-npm-jul-17/601>\
**Category:** Discord-Discussions\
**Created:** [November 3, 2022, 10:24am UTC](https://community.nocodb.com/t/reverse-proxy-npm-jul-17/601 "2022-11-03T10:24:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:24am UTC](https://community.nocodb.com/t/reverse-proxy-npm-jul-17/601/1 "2022-11-03T10:24:58Z")

</div>

> 🙋‍♂️ **sph** _asked_

## trying to set up nocodb (npm) behind a proxy (nginx)

#### ```shell

#### NC\_PUBLIC\_URL=[https://my.domain.tld/noco](https://my.domain.tld/noco)

#### NC\_BACKEND\_URL=[http://127.0.0.1:9001](http://127.0.0.1:9001)

#### NC\_DASHBOARD\_URL=/noco/dashboard

#### ```

#### ```nginx

#### location /noco/ {

#### if ($scheme != “https”) {

#### return 301 https://$server\_name$request\_uri;

#### }

#### proxy\_set\_header X-Forwarded-For $remote\_addr;

#### proxy\_set\_header X-Forwarded-Proto ‘https’;

#### proxy\_set\_header Host $host;

#### proxy\_pass [http://10.23.2.5:9001/](http://10.23.2.5:9001/);

#### }

#### ```

#### 

#### all I get is `Cannot GET /dashboard` and `GET /dashboard 404 148 - 2.708 ms` in the npm log

#### 

#### what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:24am UTC](https://community.nocodb.com/t/reverse-proxy-npm-jul-17/601/2 "2022-11-03T10:24:59Z")

</div>

> 🙋‍♂️ **sph** _replied_

#### hmm, it does work with portforward over ssh

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:25am UTC](https://community.nocodb.com/t/reverse-proxy-npm-jul-17/601/3 "2022-11-03T10:25:00Z")

</div>

> 🙋‍♂️ **sph** _replied_

#### ~~managed to get it working with `proxy_pass http://10.23.2.5:9001/noco/`~~

#### 

#### api urls won’t work this way 😕

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:25am UTC](https://community.nocodb.com/t/reverse-proxy-npm-jul-17/601/4 "2022-11-03T10:25:01Z")

</div>

> 🙋‍♂️ **sph** _replied_

#### ```nginx

#### location ^~ /noco/dashboard {

#### if ($scheme != “https”) {

#### return 301 https://$server\_name$request\_uri;

#### }

#### proxy\_set\_header X-Forwarded-For $remote\_addr;

#### proxy\_set\_header X-Forwarded-Proto ‘https’;

#### proxy\_set\_header Host $host;

#### proxy\_pass [http://10.23.2.5:9001/](http://10.23.2.5:9001/);

#### 

#### rewrite /noco(.\*) $1 break;

#### }

#### location ^~ /noco/ {

#### if ($scheme != “https”) {

#### return 301 https://$server\_name$request\_uri;

#### }

#### proxy\_set\_header X-Forwarded-For $remote\_addr;

#### proxy\_set\_header X-Forwarded-Proto ‘https’;

#### proxy\_set\_header Host $host;

#### proxy\_pass [http://10.23.2.5:9001/](http://10.23.2.5:9001/);

#### }

#### ```

#### that’s one unholy piece of kludge but it works

#### `NC_DASHBOARD_URL=/dashboard`

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:25am UTC](https://community.nocodb.com/t/reverse-proxy-npm-jul-17/601/5 "2022-11-03T10:25:02Z")

</div>

[Autogenerated from discord](https://discord.com/channels/661905455894888490/997602123799859231)

* * *

#### Join [NocoDB’s](http://www.nocodb.com/) community

[Discord](https://discord.gg/5RgZmkW) • [Twitter](https://twitter.com/nocodb) • [Reddit](https://www.reddit.com/r/NocoDB/) • [Docs](https://docs.nocodb.com/)
