How to add locations to "default site"? #4582
Replies: 1 comment
|
I think Remember that from inside the NPM container: means the NPM container itself. So your dummy Proxy Host receives something like: and proxies it to: That request enters Nginx again with the same Host header, matches the same Proxy Host again, and gets proxied back to itself again. Conceptually: That also explains: because the request repeatedly passes through the proxy chain and headers can grow until Nginx rejects it. The built-in NPM "default site" isn't an upstream application that you can reach by proxying to For what you're trying to build, I would use a tiny separate container for the static root page, for example another Nginx container: Put it on the same Docker network as NPM, and configure the dummy Proxy Host to forward its normal Then keep your Custom Locations forwarding to their individual services. That gives you: without proxying NPM back into itself. |
Uh oh!
There was an error while loading. Please reload this page.
I really don't one sub domain for each and every service.
Hence I'd like to either create a default site and add multiple locations or use the builtin default site for that. Unfortunately the latter only works for http and there is no option to add locations.
As a workaround, I created a dummy host. This dummy host is really only meant to service multiple "custom location" entries. But the main page should still be some simple, static page. Since I am forced to enter something in scheme / host forward IP, I used htttp://127.0.0.1:80. My hope was that then, I would see the "default site" that I have configured in the settings.
However, instead I am getting:
400 Bad Request
Request Header Or Cookie Too Large
openresty
Is there any good way to achieve this?
(I'm afraid not, in which was I would convert this into a bug report/feature request)
All reactions