Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use this nginx configuration with npm? #2264

Closed
dezerving opened this issue Sep 15, 2022 · 2 comments
Closed

How can I use this nginx configuration with npm? #2264

dezerving opened this issue Sep 15, 2022 · 2 comments

Comments

@dezerving
Copy link

I am trying to setup a reverse proxy for Spleeter-Web with NPM. The reverse proxy is working great. I can reach the site through my subdomain and process files. I just can't seem to get my requests to be proxied correctly (downloading files from the webpage). Here's the nginx configuration that they want to use:

    server <container IP>:8000;
}

server {
    listen 80;
    client_max_body_size 50M;

    location /static/ {
        alias /webapp/staticfiles/;
    }

    location /media/ {
        alias /webapp/media/;
    }

    location / {
        proxy_pass http://django_react;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $host;
        proxy_set_header Authorization "";
        proxy_redirect off;
    }
}

Every time I try to download a processed file or playback any media on the webpage I get a 404. I can verify the files are being created and the container has access to them. It is a matter of getting the right config in npm and I just haven't been able to figure it out. Here's what I have tried so far and have not had any success.

image
image

I just can't seem to figure out what else I should do. The reverse proxy should be taking me to my files at spleeter.domain.com/media* however, it just returns a 404 even though the files are present. Which part of the config am I messing up?

Appreciate the help!

@keniobats
Copy link

Hi @dezerving, any updates about this? I'm facing the same issue with Django. Thanks!

@dezerving
Copy link
Author

Unraid Support? JeffreyCA/spleeter-web#57

Take a look here JeffreyCA/spleeter-web#57 I was able to get things solved today because I had a folder mapping issue with NPM.

NPM needs access to the directories so make sure they are correctly mapped for NPM as well as the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants