Welcome! Log In Create A New Profile

Advanced

proxy_pass to istio ingressgateway (envoy)

Posted by jstockhausen 
proxy_pass to istio ingressgateway (envoy)
November 08, 2019 03:34PM
Hello,

I have first created a istio discussion topic but I think I could get help here too.
Ref: https://discuss.istio.io/t/nginx-proxy-pass-to-istio-ingress-gateway-404/4330


I have a nginx reverse proxy running inside the nginx:alpine container that sends some requests to a service running in a k8s cluster. The k8s cluster has istio-ingressgateway controlling the routing. The istio proxies are envoy.

When I try to curl the k8s service endpoint directly from within the nginx:alpine container I get a 200 but if I curl the nginx endpoint I get a 404 from envoy. So the request from the proxy is different than the request that I get when I curl directly. Trying to figure out why.
Re: proxy_pass to istio ingressgateway (envoy)
November 09, 2019 02:53PM
I tried to accomplish same task in apache and it worked as expected.
```
<VirtualHost *:3900>
ServerName localhost

ProxyRequests off
SSLProxyEngine on
<Location /api-url>
RewriteEngine on
RewriteRule "^/api-url/(.*)$ /$1"
ProxyPass "https://myapp.com"
ProxyPassReverse "https://myapp.com"
</Location>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
```
I would prefer to use nginx though. If I can't figure it out soon I will have to do a packet capture to compare requests.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready