Hello, I have this problem, if I use only Apache SSL it works without problems, but if I change it to Nginx & Varnish & Apache it stops working and it gives error 500, and it repairs the permissions, possibly it is a problem of ports?
HTTP: Nginx (80) -> Varnish (82) -> Apache (8181)
HTTPS: Nginx (443) -> Varnish (82) -> Apache (8181)