#Nginx proxy, admin /app not working

2 messages · Page 1 of 1 (latest)

nimble trellis
#

Hi all im having problems trying to acces my admin dashboard. im serving it trough a subdomain of my site. /health returns OK but /app is broken

Handle API requests

location /medusa/ {
proxy_pass http://127.0.0.1:9000/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
}

Serve admin static files directly

location /app/ {
alias /path/to/your/medusa/.medusa/server/public/admin/;
try_files $uri $uri/ /app/index.html;
}

https://api.flamingowonen.nl/app/assets/index-Ct2k1UeK.js
Request Method:
GET
Status Code:
404 Not Found
Remote Address:
161.97.135.64:443
Referrer Policy:
strict-origin-when-cross-origin

It seems like it cant find the correct files

mild cosmos
#

hmmm
try to use
location /medusa/ {
proxy_pass http://127.0.0.1:9000/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
}
then https://api.flamingowonen.nl/medusa/app for admin panel but I think you need to provide Medusa with backend_url like https://api.flamingowonen.nl/medusa because its now redirecting to https://api.flamingowonen.nl/app which is not correct.