I have a Raspberry pi 4 and 5.
I ran my site on my pi 4, github:
https://github.com/maxwalks/ChatApp
everything ran fine, no problem at all. I use pm2 so i can access it with local ip
I did the exact same on my raspberry pi 5 and the website loads once and when trying to reconnect it just doesnt work. I will link a video.
I also tried using ubuntu server instead of debian. Same result.
Keep in mind when using localhost the website works fine on my pi 5, just not when using something like nginx or pm2 to be able to connect it outside of the device.
in the first video it is running on my raspberry pi 5, not working.
in the second video is another server running Ubuntu Server, did the exact same yet it works on this server but not on a raspberry pi 5.
https://www.youtube.com/watch?v=NBLIujruqsc
https://www.youtube.com/watch?v=fOvElSWwKbg
(Yes, you can know the public ip i will probably delete the server anyways)