http:
  routers:
    nextcloud:
      rule: "Host(`nextcloud.rpisrv.com`)"
      entrypoints:
        - "https"
      service: nextcloud
      middlewares:
        - https-redirect
        - nextcloud-secure-headers
#         - nextcloud-chain
      tls:
        domains:
          - main: "nextcloud.rpisrv.com"
        certresolver: ""
  # serversTransports: # ????
  #   nextcloud:
  #     insecureSkipVerify: true

  services:
    nextcloud:
      loadBalancer:
        servers:
          - url: "http://10.10.1.52:11000" # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See http>
        passHostHeader: true

  middlewares:
    nextcloud-secure-headers:
      headers:
        hostsProxyHeaders:
          - "X-Forwarded-Host"
        referrerPolicy: "same-origin"
        customResponseHeaders:
          - X-Robots-Tag: "none"

    https-redirect:
      redirectscheme:
        scheme: https 
        permanent: true 

#     nextcloud-chain:
#       chain:
#         middlewares:
#           # - ... (e.g. rate limiting middleware)
#           - https-redirect
#           - nextcloud-secure-headers
