You’re right, that was a silly mistake.
After including the https, requests are no longer being duplicated from a 302 to a 200.
When running curl -v https://sub.domain.com
I get a 200 success.
However, I’m afraid it gives the same response as posted earlier. It simply redirects to the default frontpage.
phpfpm | 172.31.0.4 - 28/Dec/2020:18:49:35 +0000 "GET /index.php" 302
caddy | {"level":"info","ts":1609181375.0495365,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"162.158.93.194:53918","proto":"HTTP/1.1","method":"GET","host":"php.domain.com","uri":"/servers","headers":{"Cf-Visitor":["{\"scheme\":\"https\"}"],"User-Agent":["curl/7.68.0"],"Connection":["Keep-Alive"],"Accept-Encoding":["gzip"],"Cf-Ipcountry":["DE"],"X-Forwarded-For":["2a01:4f8:221:2999::2"],"X-Forwarded-Proto":["https"],"Cf-Request-Id":["074c4841f70000c26d0e17b000000001"],"Cdn-Loop":["cloudflare"],"Cf-Ray":["608d76498da2c26d-FRA"],"Accept":["*/*"],"Cf-Connecting-Ip":["2a01:4f8:221:2999::2"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"","proto_mutual":true,"server_name":"php.domain.com"}},"common_log":"162.158.93.194 - - [28/Dec/2020:18:49:35 +0000] \"GET /servers HTTP/1.1\" 302 20","duration":0.022119267,"size":20,"status":302,"resp_headers":{"Pragma":["no-cache"],"Location":["https://php.domain.com"],"Content-Type":["text/html; charset=UTF-8"],"Set-Cookie":["PHPSESSID=0db27f910de917af44e0822210f27ee3; path=/"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Server":["Caddy"],"Status":["302 Found"],"Cache-Control":["no-store, no-cache, must-revalidate"],"Vary":["Accept-Encoding"],"X-Powered-By":["PHP/7.4.13"],"Content-Encoding":["gzip"]}}
Now, we’ve been at this for quite a while.
My initial question, in the start of the topic, has long since been answered, and I feel like this topic is being dragged out because of my framework, which is still not relevant to Caddy.
I appreciate your help a lot - it really means a lot to me.
But I also realize that you’re probably a busy person, and can’t dedicate so much of your time to an issue like this.
Therefore I’m hoping we can put this to rest soon, one way or another.
Do you want to continue helping me, the way we’ve been doing so far, back and forth?
Would giving you access to the source code help?
I can even pass on some SSH credentials, if you like to see the configuration for yourself - there’s nothing else running on the server.
If you don’t mind continuing, I’ll of course be happy, but I’m also in complete understandings if you’re not interested.
Like I said, my original question has already been answered, so it feels like we’re just dragging this out, which I’m not interested in doing to a knowledgeable person like you - I’m sure you could spend your time on way more important things, and I don’t want to hold you up.
Please let me know, and thanks for your help so far.