I have an HTTP upstream application which is served from a subfolder /foo. The application is aware that its served from a subfolder so some kind of “baseURL” is in place. The app is currently reachable from the intranet via http://IP-of-the-server/foo.
Please specify which software it is. The existence of a baseurl option does not mean the application supports being served from a subfolder – sometimes it’s just a variable that is prepended to links in a notification handler like email. Consulting the documentation of such a software and, if unsuccessful, maybe their support forums/issue tracker should yield more info on whether people tried it already and if so, what worked for them.
As the linked thread specifies, HTML filtering/header rewriting is advanced stuff, and I would exhaust the easier solutions first before diving head first into some kind of config somebody posts here while you don’t understand what is happening.
Its a custom-made PHP application which runs behind an apache on the intranet.
I am not sure if there is a baseURL option at all in that application. All I can say, that it runs for years and is served from a subfolder /foo and all assets are loaded correctly.
Same here. But even the easier solution like Option 1 and Option 2A doesn’t click with me without an example.
Since the app already lives inside a subfolder and is aware of that fact, I assumed that Option 1 is the way to go. But as I want to have just map a subdomain to a subfolder, I have the idea that Option 2A makes more sense.
From my understanding what it does: When a user hits https://foo.domain.tld the block appends foo and reverse proxy that to the IP, so as a result the request gets transformed into http://IP/foo.
Thanks for your answers, which lead eventually to a working solution.
That’s interesting because exactly that solution didn’t work for most software for me.. but maybe it’s really about the support for being served from a subdirectory. So I stopped ever bothering with rewrites and all new webapps are always served via dedicated subdomain.
This was fruitful even for me, so let me thank you as well.