I have a basic nodejs server serving static files. It works very well in local tests.
However, I hosted it on a google cloud instance. Set up a nginx server. Accessing the page works fine.
The problem is that some included js files in the html page are not found when accessing the page from the google hosted server. I checked the code/file, it is the same as the one used in local tests.
let express = require('express');
var app = express();
app.use(express.static('public'));
app.get('/',function(req,res){
res.sendFile(__dirname + '/main.html');
});
app.listen(8080);
console.log("listenning on 8080");
HTML page:
<head>
<script type="text/javascript" src="/web3-min.js"></script>
<script type="text/javascript" src="/etherjs.js"></script>
Error: http://prntscr.com/jmue8t
File architecture on the instance: http://prntscr.com/jmuebs
Why is it doing that and how to solve that?
Edit: NGINX configuration file (server_name is my instance external IP):