This problem already take days for me to search the solution. I already search in this page but only empty result.
I even don’t know where the problem starts. But the chronology is:
- I make Ubuntu20.04 Server t2.micro EC2 instance
- Only have 25GB storage
- Configure the security group as open as posibble like this:security config
- After launched, i’m installing nodejs 14.17.5
- run npm install
- My app run on port 8000.
- I go to my-ec2-public-ip-address:8000/ display only json message
- When i go to my-ec2-public-ip-address:8000/login i only get the html (no css, img, etc )
in the network tab, this is the screenshotssl_error_screenshot
but when i test the static file, for example my-ec2-public-ip-address:8000/styles/style-login.css the server returning correct css file.
if you want to see the source-code, let me know in the comment, because i don’t think it will help much. Because my guess is the problem exist on the server configuration. When run locally, everything normal