Redirect to SSL base domain and specific path


I'm using the following configuration to redirect connections accessing */admin interface to SSL:

  address = ":80"
    regex = "http://(.*)/admin"
    replacement = "https://${1}/admin"
  address = ":443"
  compress = true
        certFile = "/etc/ssl/mine/fullchain.pem"
        keyFile = "/etc/ssl/mine/privkey.pem"

I would do do the same for the base URL. I would like to redirect the base URL, e.g. alongside to SSL, but avoid forced redirect for every other path.

Any ideas how to achieve the proper redirect?

The following seems to work:

regex = "http://(.*)/($|admin)"
replacement = "https://${1}/${2}"