I want to add and forward all traffic to `localhost/admin/` instead of `localhost/`.
App listen to those paths:
- `localhost/` (then gets 302 to `localhost/login` by application),
- `localhost/overview`,
- `localhost/books/details`,etc.
I want admin user to use those urls:
- `localhost/admin/`(to get 302 `localhost/admin/login` by application)
- `localhost/admin/overview`
- `localhost/admin/book/details`
With my reverse proxy (see below):
- `localhost/admin/` I get 302 `localhost/login` by application, /admin tag is not forwarded
I could use also `ingrees-nginx-controller` instead of mounting file. In docker nginx.conf (or similar to k8s) server {
listen 80 default_server;
listen [: : ]: 80 default_server;
location /admin {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host/admin;
proxy_pass http: //<conteiner2>.docker-network;
}
...
}
App listen to those paths:
- `localhost/` (then gets 302 to `localhost/login` by application),
- `localhost/overview`,
- `localhost/books/details`,etc.
I want admin user to use those urls:
- `localhost/admin/`(to get 302 `localhost/admin/login` by application)
- `localhost/admin/overview`
- `localhost/admin/book/details`
With my reverse proxy (see below):
- `localhost/admin/` I get 302 `localhost/login` by application, /admin tag is not forwarded
I could use also `ingrees-nginx-controller` instead of mounting file. In docker nginx.conf (or similar to k8s) server {
listen 80 default_server;
listen [: : ]: 80 default_server;
location /admin {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host/admin;
proxy_pass http: //<conteiner2>.docker-network;
}
...
}