Nginx proxy [Jun 12]

:raising_hand_man: NoobieDev asked

Hey guys , i was deploying nocodb on Ubuntu 20.04 using docker.

I used the following command to create run the container

``` sudo docker run -d --name nocodb \

-v “$(pwd)”/nocodb:/usr/app/data/ \

-p 8086:8080 \

-e NC_PUBLIC_URL:=“https://domain/db” \

-e NC_BACKEND_URL:=“https://domain/db” \

nocodb/nocodb:latest ```

Then set up a reverse proxy on nginx

```location /nocodb {

proxy_set_header Host $host;

proxy_set_header X-Forwarded-Host $host:$server_port;

proxy_set_header X-Forwarded-Proto https;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_pass http://localhost:8086/;

chunked_transfer_encoding off;

proxy_buffering off;

proxy_cache off; }

}

```

When accessing from my domainname (https://domainname/nocodb) its being redirected to https://domainname/dashboard but the page says 404 . Im new to docker and nginx so would be great to get some help. Thanks

:man_technologist: pranavxc replied

Can you try to access https://domainname/nocodb/dashboard

:raising_hand_man: NoobieDev replied

Thanks for the response <@682854952657616902> .

:raising_hand_man: NoobieDev replied

When i do that is says , im guessing the extra slash is the issue

image0

:man_technologist: pranavxc replied

okkk

:man_technologist: pranavxc replied

proxy_pass http://localhost:8086/; => proxy_pass http://localhost:8086;

:raising_hand_man: NoobieDev replied

image0

:raising_hand_man: NoobieDev replied

the first slash is gone , but still same error . tried /nocodb/dashboard/ as well

:man_technologist: pranavxc replied

nginx configuration looks good :thinking:

:raising_hand_man: NoobieDev replied

the redirection to /dashboard does not happen now.

:man_technologist: pranavxc replied

if you are directly accessing dashboard path then it won’t redirect https://domainname/nocodb/dashboard

:raising_hand_man: NoobieDev replied

okay , I had the same issue when i tried deploying it as node app using pm2.

:man_technologist: pranavxc replied

could you able to access directly without ngnix ?

:raising_hand_man: NoobieDev replied

i was able to access with location / on a fresh server.

:raising_hand_man: NoobieDev replied

i have my api running on loaction /api

:man_technologist: pranavxc replied

can you check the docker logs as well

:man_technologist: pranavxc replied

docker logs -f nocodb

:raising_hand_man: NoobieDev replied

image0

:raising_hand_man: NoobieDev replied

Mybad this is the wrong one

:raising_hand_man: NoobieDev replied