HTTP path issue
This may be a simple issue, but it's beyond me currently. I'm trying to setup redbird to reverse proxy my docker services, which are seen when I start redbird. However, the paths aren't respected when I try the URL. For example, when I type domain.ext:8080/prn, I'm redirected to domain.ext:8080/userlogin, which is the page that plexrequests automatically diverts a user to. If I change the URL to domain.ext:8080/prn/userlogin, I get the page, minus the CSS for it, and the log says "no valid route found for the given source". I think I need some sort of "baseurl" function, but don't know how to manage that in the config. My config is below. Any assistance you can offer would be appreciated.
`var proxy = require('redbird')({ port: 8080, });
// var redbird = require('redbird')({ // port: 8080, // });
require('redbird') .docker(proxy) .register("domain.net/prn", 'rogueosb/plexrequestsnet');
require('redbird') .docker(proxy) .register("domain.net/nzb", 'linuxserver/nzbget'); `
I think you need this: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
In order to debug this, check in chrome dev tools what urls are actually being generated by your application. Proxy is stateless, he just proxies one url to another, it does not do anything besides that.
ET http://manderso.net:8080/Content/bootstrap.css userlogin:15 GET http://manderso.net:8080/Content/font-awesome.css userlogin:16 GET http://manderso.net:8080/Content/pace.min.css userlogin:17 GET http://manderso.net:8080/Content/awesome-bootstrap-checkbox.css userlogin:18 GET http://manderso.net:8080/Content/base.css?v=1.9.7 userlogin:19 GET http://manderso.net:8080/Content/Themes/plex.css?v=1.9.7 userlogin:21 GET http://manderso.net:8080/Content/jquery-2.2.1.min.js userlogin:20 GET http://manderso.net:8080/Content/tooltip/tooltipster.bundle.min.css userlogin:22 GET http://manderso.net:8080/Content/handlebars.min.js userlogin:23 GET http://manderso.net:8080/Content/bootstrap.min.js userlogin:24 GET http://manderso.net:8080/Content/bootstrap-notify.min.js userlogin:25 GET http://manderso.net:8080/Content/site.js?v=1.9.7 userlogin:26 GET http://manderso.net:8080/Content/pace.min.js userlogin:27 GET http://manderso.net:8080/Content/jquery.mixitup.js userlogin:28 GET http://manderso.net:8080/Content/moment.min.js userlogin:29 GET http://manderso.net:8080/Content/tooltip/tooltipster.bundle.min.js userlogin:22 GET http://manderso.net:8080/Content/handlebars.min.js userlogin:23 GET http://manderso.net:8080/Content/bootstrap.min.js userlogin:24 GET http://manderso.net:8080/Content/bootstrap-notify.min.js userlogin:25 GET http://manderso.net:8080/Content/site.js?v=1.9.7 userlogin:26 GET http://manderso.net:8080/Content/pace.min.js userlogin:27 GET http://manderso.net:8080/Content/jquery.mixitup.js userlogin:28 GET http://manderso.net:8080/Content/moment.min.js userlogin:29 GET http://manderso.net:8080/Content/tooltip/tooltipster.bundle.min.js
Once I enter manderso.net:8080/prn, the server redirects to the root of the plexrequestsnet application. I've also tried adding ROOT_URL="http://localhost/prn" to the environment config for the container, which didn't help. According to this area's comment on this page, https://github.com/tidusjar/PlexRequests.Net/issues/199, adding proxy_pass http://localhost:3579/request; to the proxy config may help. How would I add that to the redbird config file? Thanks again for your help.
now trying a new docker image, from linuxserver/plexrequests. It says to add an environment variable of URL_BASE=/directory to the environment, which is what I've done. When I start the docker container, I can get to it using host:3000/prn, but when I use redbird, I get a 404 w/ manderso.net/prn. When i use manderso.net:3000/prn, the page comes up fine, css and all. Why wouldn't the specified port be passing? This is my current config: `var proxy = require('redbird')({ port: 80, });
// var redbird = require('redbird')({ // port: 8080, // });
require('redbird') .docker(proxy) .register("manderso.net/prn", 'linuxserver/plexrequests'); `
I have a similar problem. Paths are relative, so this should be fine.
App runs on :8080, reverse proxy routes to :80/cockpit

What am I doing wrong?
I found the culprit.
usually when you create a static express server, the path is interpreted as a folder.
Of course, that only works if the path ends with a slash: localhost/app/
Unfortunately, redbird does not support that as of now, so this does not work:
proxy.register('localhost/app/', 'localhost:8080')
I found my way around this problem by using subdomains.
proxy.register('app.localhost', 'localhost:8080')
Best, Martin