SinusBot / docker

🐳 Official Docker image of the SinusBot for TeamSpeak 3 and Discord.
https://sinusbot.github.io/docker
MIT License
78 stars 32 forks source link

Does not work with reverse proxy #57

Open EpicJosch opened 2 months ago

EpicJosch commented 2 months ago

Im using sinus bot docker with the linuxserver/swag reverse proxy (nginx) as an ssl proxy. I set everything up just like it is shown in sinusbot documentation and when i try to access the webinterface it works normally and also the ssl encryption works. But as soon as i reload the page, try to login to the web interface or try to open the web interface in a new web browser tab, i get an network timeout. Then the timeout keeps happening and i need to wait a long time before it starts to reach the webinterface and this cycle continues...

How can i fix this?

EpicJosch commented 2 months ago

config.ini

TS3Path = "/opt/sinusbot/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/opt/sinusbot/data/"
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 0
LogLevel = 0
EnableProfiler = false
YoutubeDLPath = "/usr/local/bin/yt-dlp"
EnableDebugConsole = false
EnableInternalCommands = false
AllowStreamPush = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
ExternalFileBase = ""
InstanceActionLimit = 0
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = "music.ejgaming.de"
HostnameMask = ""
SampleInterval = 0
StartVNC = false
EnableWebStream = false
LogFile = ""
LicenseKey = ""
IsProxied = true
DenyStreamURLs = []
Pragma = 0
UserAgent = ""

proxyconf.conf

server {

    listen 443 ssl;
    listen [::]:443 ssl;

    server_name music.ejgaming.de;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {

        set $upstream_app app;
        set $upstream_port 8087;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_set_header X-Forwarded-Host $host:$server_port;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_buffers 16 16k;
        proxy_buffer_size 16k;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";

    }
}