I try to deploy my nodejs app. It listens on 3000 port. Also nginx does mapping of 80th port to my app on 3000. The problem - when I open browser, and hit my ip address the page loads html and css, but all javascript files throw this failed to load error. I tried to turn off nginx and firewall and link my app to 80th port directly, but I get the same error. Only javascript files fail to load.

Also I looked in my nodejs app logs, there are GET requests for html and css, but no get requests for js files. Like these requests never arrive to nodejs but get blocked somewhere in-between.

I need help.

1 comment
  • EDIT

    On other ports my app works ok, like 81st port, 3000 port, but on 80th port I have this trouble with javascript files even with firewall off. Does anyone know what can block them?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there @alona2156,

What is the exact error that you see in your web console?

Also, are you seeing any errors in your Nginx error log:

  • tail -100 /var/log/nginx/error.log

Feel free to share your exact Nginx config here so that I could try to advise you further.

Regards,
Bobby

Submit an Answer