Currently I am trying to Migrate a site that was living on an Apache Load balanced Server to my k8s cluster. However the application was set up strangely with a proxypass and proxyreversepass like so:
ProxyPass /something http://example.com/something
ProxyPassReverse /something http://example.com/something
And I would like to mimic this in an Nginx Ingress
First I tried using the rewrite-target annotation however that does not keep the Location header which is necessary to get the application running again. 
Then I tried to get the proxy-redirect-to/from annotation in place inside a specific location block like so:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: gpg-app-ingress
  annotations:
    nginx.ingress.kubernetes.io/proxy-redirect-from: http://originalapp.com/something
    nginx.ingress.kubernetes.io/proxy-redirect-to: http://example.com/something
spec:
  rules:
  - host: example.com
    http:
      paths:
        - path: /something
          backend:
            serviceName: example-com
            servicePort: 80
I would like to be able to instead use a custom proxy_pass variable but it doesn't seem like its possible.
What would be the best way to mimic this proxy pass?
 
    