apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  namespace: music2score
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: 'true'
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    nginx.ingress.kubernetes.io/ssl-redirect: 'true'
spec:
  tls:
    - hosts:
        - music2score.xyz
        - www.music2score.xyz
      secretName: music2score-xyz-tls
  rules:
    - host: music2score.xyz
      http:
        paths:
          - pathType: Prefix
            path: /?(.*)
            backend:
              service:
                name: apache-server
                port:
                  number: 80
    - host: www.music2score.xyz
      http:
        paths:
          - pathType: Prefix
            path: /?(.*)
            backend:
              service:
                name: apache-server
                port:
                  number: 80  