How can you serve a folder of files with Nginx?

I’m trying to serve a folder that contains HTML, JS, PHP, Java, and a couple of other different file types with Ngnix. I plan to then import two JS files from that folder into my index.html like so : &…

How to monitor incoming and outgoing network bytes from express & socket.io servers

I have an express server which also contains socket.io on it. I want to know how many bytes going outside and coming inside on each clients’ requests including HTTP and Socket (WSS). I’m looking for a …

Nginx is trying open file instead of redirect to proxy

Hi I am using Nginx together with njs and have such location in my config Inside of njs file I am making POST request to API In this request I am getting body response as formdata converting it to JSON and making POST request to 3rd party with following error. *63 open() “/usr/share/nginx/html//tc/api/endpoint/book” failed (2: No such file or directory) while sending to client, client: 10.0.0.14, server: _, request: “POST /checkout/payment?key=val HTTP/1.1”, subrequest: “/tc/api/endpoint/book”, upstream: “https://11.100.216.19:443//book”, host: “proxy.eu-west-2.elb.amazonaws.com” This request should be proxied to 3rd party but looks like it trying to open file but not making redirect. This issue