I’m trying to configure my react and spring boot rest api at my vps server and I met we problems. Firstly, when I run my front api (react) and I’m trying to call my backend (spring boot) I must use https://example.com:8080 address. When I try to use my vps ip with port, my https is turns off… its write that my https is dangerous. Next, when im trying to call https://localhost:8080 i have error that i cannot connect to this address.
So:
- call to https://example.com:8080 work
- Https://ipaddress:8080 not working (lost my ssl certificate)
- Https://localhost:8080 not working (connection refused)
My backend is work on port 8080. Is running, when im trying to call localhost by curl in command line its working, but on browser not… how to call api? Is example.com:8080 correctly connection? I think that can be some lags because of ssl handshake…
I will add that when im running front and backend locally, localhost is working…
What is the best practice to call backend when im running front and backend on one vps?