I do have specific issue related to lighttpd 1.4 bug. Unlike all other webservers on whole world, Lighttpd proxying not only request, but also the context for what is set.
So if you ex. set proxying "/joplin" --> xxx.xxx.xxx.xxx:22300 it will forward it as xxx.xxx.xxx.xxx:22300/joplin
And now you probably get the point - I have no option to change it (well, the only way could be forward whole root context "/" on domain). I did tried workaround described there, but with no luck at all. Beside it's really bad.
Unfortunately, it's router, where I can't run another webserver (like Apache or Nginx) without lot of troubles, so this is not the way as well.
It would help me a lot, if there could be some option for setting of listening path (ex. :/joplin/api/....) Is there some option for? Ex manage it by some script/command in container directly using Dockerfile or something... any idea?
APP_BASE_URL definitely not, as it sets where expects user coming from, but doesn't change app context itself.
So, in case of ex. /login app in docker instance listen on xxxxxx:22300/login and I need, that root context of app would be xxxxx:22300/joplin/login instead.
APP_BASE_URL is not working this way, unfortunately. It's bit like "link of home page", where it should go when you want to visit home page. However that API_BASE_URL looks promising... is it really for all context, or just for /api/....?
where the curls direct to /api/... works still fine, /joplin/api/... doesn't.
~$ curl http://192.168.1.3:22300/api/ping
{"status":"ok","message":"Joplin Server is running"}
~$ curl http://192.168.1.3:22300/joplin/api/ping
Internal Server Error
and it definitely accepts the variables:
app_1 | 2021-07-22 20:26:26: App: Starting server v2.1.1 (prod) on port 22300 and PID 27...
app_1 | 2021-07-22 20:26:26: App: Running in Docker: true
app_1 | 2021-07-22 20:26:26: App: Public base URL: http://192.168.1.3:22300/joplin
app_1 | 2021-07-22 20:26:26: App: API base URL: http://192.168.1.3:22300/joplin
app_1 | 2021-07-22 20:26:26: App: User content base URL: http://192.168.1.3:22300/joplin
will yet try to go with some newer version yet....
app_1 | 2021-07-22 20:48:32: App: Starting server v2.2.7 (prod) on port 22300 and PID 27...
app_1 | 2021-07-22 20:48:32: App: Running in Docker: true
app_1 | 2021-07-22 20:48:32: App: Public base URL: http://192.168.1.3:22300/joplin
app_1 | 2021-07-22 20:48:32: App: API base URL: http://192.168.1.3:22300/joplin
app_1 | 2021-07-22 20:48:32: App: User content base URL: http://192.168.1.3:22300/joplin
nad same story, unfortunately. The only difference is, that I do have nice error page now, instead of just error mesage as before
If I can be completely honest I don't understand anything about what you're doing, so I'm not sure a GitHub ticket would help. Perhaps it's because I don't know lighthttpd or something.
The main point is, that I need somehow configure the server the way it will response on some custom context (base url) other, then /.
By default, you can access server by "/" path (ex. /api/... or /login). That is the way how it is working now. BUT - unfortunately, I need to be able to set server the way, it actually listen on, for example /joplin/api/... or /joplin/login etc...
And it's because lighttpd proxy is stupid the way, that if I set proxy /joplin, it instead of calling "/" on target server, it does /joplin as well.
so, for example when i set proxyPass for "/foo": http://host.com/foo/api/ping will proxy to backend as http://local.host/foo/api/ping (BUT it's not possible to set up the way it will do http://local.host/api/ping)