proxy_pass directive don't catch sequence

Kzone nginx-forum at forum.nginx.org
Sun Feb 7 10:04:54 UTC 2021


Hi,

The goal is to send correct response when a malformed URL leads to 404 file
not found. What happens is that, from times to times, I get a faulty URl
like this one :

https://FQDN-Server-Adress/server/rest/services/Urbanisme/ChargesUrbanistiques/jsapi/dojo/dojo.js

But the required file is located in
https://FQDN-Server-Adress:6443/arcgis/login//jsapi/dojo/dojo.js

Therefore I've set a proxy_pass directive following the location, but it
seems that the involved sequence is not correctly catched up and the
malformed url are still returned. What am I doing wrong ?

The double slashes in proxy_pass between 'login' and 'jsapi' is needed and
I'm under Windows Server 2016

Thanks.

Code chunk :
-----------------

 ## Redirect to tomcat when mismatch with /jsapi/dojo/ (20210130)

    location /jsapi/dojo/ {

        proxy_http_version 1.1;
        include C:/NginX/1.19.1/proxyparams/proxy_params.conf;
        proxy_pass
https://FQDN-Server-Adress:6443/arcgis/login//jsapi/dojo/;
        sub_filter 'Server-IP-Adress:1543' 'FQDN-Server-Adress';
        
        proxy_buffering on;
        proxy_buffer_size 16k;
        proxy_busy_buffers_size 24k;
        proxy_buffers 64 4k;
    
        client_max_body_size 12m;
    }

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,290676,290676#msg-290676



More information about the nginx mailing list