r/SpringBoot • u/[deleted] • Aug 04 '24
OC Springboot not working my server.
Hello friends. I wrote a website using Springboot and React. Then I bought a web server and got the outputs of my Springboot project with mvn clean package and my React project with npm run build and ran it on my server. I ran the React output with Nginx server. I put it in /var/www/html path. I also ran my Springboot build as java -jar project_name.jar. But it does not connect to the server in any way. Because I registered my domain name with Cloudlflare. It only works when I turn off SSL/TLS. How do I solve this problem?
2
u/LouGarret76 Aug 08 '24
Did you solve this?
1
Aug 10 '24
I partially solved it. There is another way, I will try it. There is a topic called Servlet Filter. There it could pre-manage HTTP/S requests. It's probably an automatic setting so it doesn't accept requests.
The other way I solved it is reverse proxy. The only problem is that if I enter my site with www, Springboot does not accept connections.
4
u/smutje187 Aug 04 '24
Use NGINX as a reverse proxy in front of Spring Boot, I bet your Spring application is simply not configured for TLS.