How to enable HTTPS with Spring Boot Starter

What kind of error? Is it on the browser or on the server console?

If you use a Docker Desktop, you may also try a slightly different approach - using nginx as SSL termination. You can setup HTTPS for your app (any app actually) very easily. See here

1 Like

The issue was that a self-signed certificate was in use, so the browser showed a warning message to the user. But https was properly configured.

1 Like

You can use a reverse proxy with nginx,

Deploy your application in some cloud and have lets encript add an ssl certificate to it.

You must have correctly configured the nginx.conf

This is a poc

The bad thing is that it is useful when the app is deployed.

In a local environment it will not work, you would have to configure

Just use Cloudflare to do this job for you. Do not handle it on your own.

I don’t understand, you can setup NGINX to listen to 80 and 443 and proxy it to the Vaadin web server with jar file?

Exactly. You can set up a nginx or Apache httpd to act as a reverse-proxy on 443, forwarding requests to the spring boot application running, for example, on port 8080 (http).

There are many resources on the internet on how to set up such a configuration.
If you use Vaadin push feature with websockets, pay attention to configuring the proxy to support it.

This would perfect for my project since i wanted to have diifferent webapps based on subdomain. I will try a shot, thanks =)

Hi msorry for responding so late,

In the application above, you have the code when you open the web in the about.

See that of spring confinguration on ssl I do not touch anything…

The ssl is your nginx way, I have that deployed in the Oracla cloud, which is an IaaS, the infra we have to manage it ourselves to install the proxy aka nginx, and do other things, that is, it is agnostic to spring or java as such, you can do it with any application you have.

You can try to do it with something basic in your local network if you want, giving internet output, or exposing it, with a ssl certificate, dockerizing nginx for example, it should work.

My nginx in the same DHCP pool, or network segment where I have the target application deployed.

I am also using google domain for the subdomain creation which is paid, but for a small cost.