I’m running a node.js application called serve that shows the files and folders from a specific path of my computer on a webpage:
This application works fine by itself. However, when I try to make it run with nginx
on the location /page/
, I’m not capable of seeing the contents of any files or folders and I get a 404 Not Found
error if I try to access them. I’m using the following nginx.conf
file:
events {}
http {
server {
listen 80;
server_name 127.0.0.1;
location /page/ {
proxy_pass http://localhost:8070/;
}
}
}
What am I missing here? I’m not sure if this is a nginx related question or if it’s something with the node.js app that I’m using… Does it happen because nginx cannot access addresses after the location /page/(.*)
?