Rudloff / alltube

Web GUI for youtube-dl
GNU General Public License v3.0
2.96k stars 582 forks source link

nginx reverse proxy error #419

Closed srcrs closed 2 years ago

srcrs commented 2 years ago

What is your operating system (Windows, Linux, OSX, etc.)?

Linux

What is your web server (Apache, IIS, etc.)?

apache

What version of AllTube are you using?

3.0.3

How did you install AllTube?

Docker

What version of PHP are you using?

7

What version of Python are you using?

3

What version of youtube-dl are you using?

2

Do you get any PHP-related errors in your webserver's logs?

No response

What is the content of your "config/config.yml" file?

---
# Path to your youtube-dl binary
youtubedl: vendor/ytdl-org/youtube-dl/youtube_dl/__main__.py

# Path to your python binary
python: /usr/bin/python

# An array of parameters to pass to youtube-dl
params:
    - --no-warnings
    - --ignore-errors
    - --flat-playlist
    - --restrict-filenames
    - --no-playlist

# True to enable audio conversion
convert: false

# True to enable advanced conversion mode
convertAdvanced: false

# List of formats available in advanced conversion mode
convertAdvancedFormats: [mp3, avi, flv, wav]

# Path to your ffmpeg binary
ffmpeg: /usr/bin/ffmpeg

# ffmpeg logging level.
ffmpegVerbosity: error

# Path to the directory that contains the phantomjs binary.
phantomjsDir: /usr/bin/

# True to disable URL rewriting
uglyUrls: false

# True to stream videos through server
# Set to "ask" if you want to allow it but not enable by default.
stream: false

# True to enable remux mode (merge best audio and best video)
remux: false

# MP3 bitrate when converting (in kbit/s)
audioBitrate: 128

# App name
appName: AllTube Download

# Generic formats supported by youtube-dl
genericFormats:
    best/bestvideo: Best
    bestvideo+bestaudio: Remux best video with best audio
    worst/worstvideo: Worst

# Enable debug mode.
debug: false

# True to enable audio conversion mode by default
defaultAudio: false

# False to disable convert seek functionality
convertSeek: true

Please provide the URL of a video that causes the issue.

null

Describe your issue

deploy

I use docker for deployment

version: "3"
services:
  metube:
    image: rudloff/alltube:latest
    container_name: metube
    restart: unless-stopped
    ports:
      - "10009:80"
    volumes:
      - "$PWD/config/:/var/www/html/config/"

Domain:Port visit no problem

nginx reserver config

Next, I use nginx to configure the reverse proxy

server {
    listen 80;
    server_name alltube.domain.com;
    rewrite ^(.*)$ https://$host$1 permanent;
}

server {
        server_name alltube.domain.com;
        listen 20443 ssl;

        ssl_certificate  /etc/nginx/cert/asksowhat.cn/fullchain.cer;
        ssl_certificate_key /etc/nginx/cert/asksowhat.cn/asksowhat.cn.key;

        location / {
                proxy_pass  http://96.09.34.12:10009;
        }
}

However, it is not friendly. Some static resource request paths are wrong. Originally, they should be accessed through the domain name. Now it shows the IP. I can't solve it. Please help me.

截屏2022-06-23 下午8 26 37 截屏2022-06-23 下午8 29 30