I am using NGINX version 1.18.0 as a reverse proxy server.
This is how the config look:
location /test/{
proxy_pass http://backend-server.net:7886/;
rewrite test/$ /index.htm break;
}
when test route is requested, NGINX is serving correct resources. My issue is when I look at error log, I am seeing following errors:
2021/02/19 23:03:39 [notice] 8#8: *2 "test/$" matches "/test/", client: 30.647.206.71, server: localhost, request: "GET /test/ HTTP/1.1", host: "testServer.net:9000", referrer: "http://testServer.net:9000/"
2021/02/19 23:03:39 [notice] 8#8: *2 rewritten data: "/index.htm", args: "", client: 30.647.206.71, server: localhost, request: "GET /test/ HTTP/1.1", host: "testServer.net:9000", referrer: "http://testServer.net:9000/"
2021/02/19 23:03:39 [notice] 8#8: *2 "test/$" does not match "/test/formatter.js", client: 30.647.206.71, server: localhost, request: "GET /test/formatter.js HTTP/1.1", host: "testServer.net:9000", referrer: "http://testServer.net:9000/test/"
2021/02/19 23:03:39 [notice] 8#8: *1 "test/$" does not match "/test/lib/helper.js", client: 30.647.206.71, server: localhost, request: "GET /test/lib/helper.js HTTP/1.1", host: "testServer.net:9000", referrer: "http://testServer.net:9000/test/"
2021/02/19 23:03:39 [notice] 8#8: *7 "test/$" does not match "/test/missing.js", client: 30.647.206.71, server: localhost, request: "GET /test/missing.js HTTP/1.1", host: "testServer.net:9000", referrer: "http://testServer.net:9000/test/"
2021/02/19 23:03:39 [notice] 8#8: *6 "test/$" does not match "/test/main.css", client: 30.647.206.71, server: localhost, request: "GET /test/main.css HTTP/1.1", host: "testServer.net:9000", referrer: "http://testServer.net:9000/test/"
2021/02/19 23:03:39 [notice] 8#8: *7 "test/$" does not match "/test/missing.js", client: 30.647.206.71, server: localhost, request: "GET /test/missing.js HTTP/1.1", host: "testServer.net:9000", referrer: "http://testServer.net:9000/test/"
What is the reason for these errors ("test/$" does not match "/test/lib/helper.js")? How can I fix them ?
Below image shows file structure on backend server and how files are served correctly on front end server using proxy pass.