unit icon indicating copy to clipboard operation
unit copied to clipboard

Cant proxy to a path

Open Kevin-Mc-Callister opened this issue 2 years ago • 4 comments

Can only proxy to a host, are there plans to proxy to a host and a path?

Docker image: nginx/unit:1.26.1-python3.9


{
        "listeners": {
            "*:80": {
                "pass": "routes"
            }
        },
        "routes": [
            {
                "match": {
                    "uri": "/*"
                },
                "action": {
                    "proxy": "http://192.168.1.137:80/test"
                }
            }
        ]
    }

Error:


{
        "error": "Invalid configuration.",
        "detail": "The \"proxy\" address is invalid \"192.168.1.137:80/test\""
}

Kevin-Mc-Callister avatar Aug 05 '22 22:08 Kevin-Mc-Callister

Hi Arturo, this use case is designed to be solved with https://github.com/nginx/unit/issues/732

lcrilly avatar Aug 06 '22 07:08 lcrilly

Is there an ETA for this or should I be using regular nginx in the meantime instead? @lcrilly (I see that it is "scheduled next" but im not sure what that means)

Kevin-Mc-Callister avatar Aug 06 '22 15:08 Kevin-Mc-Callister

Hi @ArtruneTranspara sorry for the late response on this.

It is not scheduled for the next release, so I would advice you to use NGINX OSS for the rewrite in the mean time and will come back to you in this thread as soon as the feature is out for review.

tippexs avatar Aug 18 '22 09:08 tippexs

Hi @tippexs thanks!

Kevin-Mc-Callister avatar Aug 18 '22 17:08 Kevin-Mc-Callister