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

Reverse Proxy not working for HTTPS #216

Open
NhaundarL opened this issue Nov 2, 2024 · 4 comments
Open

Reverse Proxy not working for HTTPS #216

NhaundarL opened this issue Nov 2, 2024 · 4 comments

Comments

@NhaundarL
Copy link

NhaundarL commented Nov 2, 2024

Hey, I'm here again ahah, I installed a reverse proxy with nginx to communicate with https, and everything works but to access the yt-dlp web interface, I go to this URL
https://myip/yt-dlp-web-ui
So I saw that I had to put an option in yt-dlp (reverse proxy), so I checked the case and put the yt-dlp-web-ui subdirectory but it doesn't work, I tried to put default IP + port, but that doesn't work either, I tried many things, but I'm still stuck. I can't connect . Do you know where the problem is?

There is no HTTPS compatibility?

This my nginx conf for yt-dlp webui :
location /yt-dlp-web-ui/ {
        proxy_pass http://IP:3033/;
        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;
    }
@marcopiovanello
Copy link
Owner

There's an example for nginx configuration.

It has been tested.

You can't reach with https:// your location because there's no ssl configurations. With no ssl conf. you'll able to reach only with http (on the port you configured in the server block)

I suggest you reading this from the official nginx docs

@marcopiovanello
Copy link
Owner

@NhaundarL sorry for the late response but a work project is going in production and I'm super invested in.

@NhaundarL
Copy link
Author

NhaundarL commented Nov 18, 2024

No problem ! Thank you for your answer.
I didn't put all my nginx.conf.
And I still have the problem. Maybe I put the wrong argument in yt dlp web ui option (reverse proxy argument) because I can access the API by https://IP/yt-dlp/#/settings but it gets charging non-stop.
Sorry for the inconvenience.
nginx.conf :

server {
    listen 8080;
    server_name IP;
    return 301 https://$host$request_uri; 
}

server {
    listen 443 ssl;
    server_name IP;

    ssl_certificate /etc/nginx/certs_nginx/certbot/conf/selfsigned.crt;
    ssl_certificate_key /etc/nginx/certs_nginx/certbot/conf/selfsigned.key;

    location ~/yt-dlp/(.*)$ {
        proxy_pass http://IP:3033/$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;
    }

    location /navidrome {
        proxy_pass http://IP:4533;
        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;
    }
}

@marcopiovanello
Copy link
Owner

I think this was solved in #110. If it still not working let me know.

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