1. Caddy version (caddy version
):
v2.1.1
2. How I run Caddy:
docker-compose
a. System environment:
docker (as mentioned above)
b. Command:
does not apply
c. Service/unit/compose file:
does not apply
d. My complete Caddyfile or JSON config:
does not apply
3. The problem I’m having:
I am trying to run Live Helper Chat on Caddy. I found this Nginx config which is a little complicated but that should be fine if I play with it patiently. I am struggling with this regex however:
(^(?!(?:(?!(php)).)*/(albums|bin|var|lib|cache|doc|settings|pos|modules)/).*?(index\.php|upgrade\.php)$)
This line is insane. I found out Go does not support lookaheads which is what is used here. The first part though is something I cannot decypher and I have no idea what those 3 nested somethings should do. I used some regex debugger which told me what this does but I still have no idea what is the expected outcome. It’s just too complicated for me.
Could someone help me translate this to Caddy, please?
4. Error messages and/or full log output:
does not apply
5. What I already tried:
regex debuggers; I tried these matchers but it obviously is not correct:
@restrict_files {
path /albums/* /bin/* /var/* /lib/* /cache/* /doc/* /settings/* /pos/* /modules/*
}
@allow_php {
path_regexp ^/((index|upgrade)\.php)?
}