I have a confusion and problem with doing maybe strange thing. I've got application, where we send a request at http://somehost:9000/endpoint/x. In /etc/hosts where is our app running we've got 123.123.123.123:somehost mapping. But on our production environment we can't touch hosts file. So we've got create proxy on nginx. So.. Is it possible to request into nginx (http://nginx:80/endpoint/x) for example and he will do that hosts mapping inside? Additional things is that we have to add .p12 certificate (it can be copied straight to nginx directories) and body + HTTP headers from request which we send from application. I think that part with hosts mapping is mostly confusing me - I don't know how to make it.
server {
listen 80;
location / {
proxy_pass http://somehost:9000;
}
}
It is a idea about sample proxy, but how to make this host mapping from that given host? Thanks!
123.123.123.123, I have to request it bysomehostand map DNS in hosts file123.123.123.123:somehost- saculo