docker-filebot
docker-filebot copied to clipboard
Trouble with jlesage/filebot and linuxserver/swag
I'm having an issue getting the filebot docker container working behind linuxserver/swag. swag is basically an nginx docker container with a few added bells and whistles...but fundamentally I'm having trouble with just the nginx proxy config in the swag container that I'm trying to implement for filebot.
filebot works fine w/o going through the proxy config...when I test straight to the IP address. And I've used it quite a bit like that when on my local home network.
When trying it through nginx I'm receiving a "404 not found" error.
There is no error in the error_log file, in the access_log I only see this:
10.20.30.43 - mike [09/Oct/2020:11:41:16 -0600] "GET /filebot/ HTTP/2.0" 404 125 "https://10.20.30.47/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0"
Here's my nginx proxy config for filebot. And note that the $upstream_app filebot does resolve in DNS correctly; I verified that with a ping filebot
from within the swag container.
location = /filebot {return 301 $scheme://$http_host/filebot/;}
location /filebot/ {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app filebot;
set $upstream_port 5800;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
location /filebot/websockify {
proxy_pass $upstream_proto://$upstream_app:$upstream_port/websockify/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
}
I suspect I'm missing something in the filebot config, like I need to add a "/filebot" to the URL location. I've had to do this for other web apps behind nginx, but if so, I'm missing how to do that in the filebot container.
Any help would be appreciated.
Thank you!
-Mike
You config is mostly the same as https://github.com/jlesage/docker-filebot#routing-based-on-url-path Do you have the following block somewhere?
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
Also, you can look at log files at log/nginx/
, under the folder you mapped to /config
. You will be able to see what is being accessed from the container's point of view.
Ah, yes, I do have that map
config block. I put it in swag's nginx conf file under the http block. At the very top:
http {
##
# Proxy web-socket connections -mfw
##
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
##
# Basic Settings
##
I did look in filebot's nginx access log as you suggested, here's what I found:
10.20.30.43 - - [13/Oct/2020:20:33:24 -0600] "GET /filebot/ HTTP/1.1" 404 162 "https://10.20.30.47/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0" "10.20.30.43"
10.20.30.43 - - [15/Oct/2020:02:31:40 -0600] "GET /filebot/ HTTP/1.1" 404 162 "https://10.20.30.47/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0" "10.20.30.43"
So it looks like it's proxying over to the same subfolder I have configured in swag's ngnix.
In filebot's nginx config, would I, in turn, need to proxy location "/filebot/" to "/" ?
But it seems like that's what I have configured swag's nginx to do in my original post. Apparently the nginx on top of another nginx is confusing me. ;)
So the log messages from Filebot appeared after you tried to access it ? If yes, then this seems to indicate that the reverse proxy is not doing its job...
Was a solution or config file ever made? this is also something I am working on.