I have a Kubernetes cluster and a very basic container. I am trying to access it through the internet and the task is very simple, I just need to list the index of the directory. Here is my basic virtual host configuration:
<VirtualHost *:80>
Alias /docs /mnt/nfs
<Directory /mnt/nfs>
DAV Off
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
When I use the service or pods with the kubectl port-forward option, it is working as expected and my files are listing with xyz.com/docs. However, when I try to access the pod via ingress through my FQDN, it gives me a 404 error. When I access a test.txt file that is inside the folder, I can see the content of the file but it is not listing the indexes like it is working with the port-forwarding option. so in short i can reach pod and access the files but can not list them with autoindex module and with same pod i am able to list index with kubectl port-forwarding option
kind: Ingress
metadata:
name: webdav-app
namespace: testing1
annotations:
cert-manager.io/issuer: "letsencrypt-staging"
#cert-manager.io/cluster-issuer: "letsencrypt-prod"
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
tls:
- hosts:
- webdav.xyz.com
secretName: webdav-app-certificate
rules:
- host: webdav.xyz.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webdav-app
port:
number: 80
Any help would be highly appreciated.
Thanks,