Thanks both for your quick replies.
@Whitestrake I barely have experience with Caddy. This is actually my first time playing around with it so sorry if the previous code did not make much sense.
So I updated Caddyfile with your code. However, I keep getting error 500 from Wordpress.
I debugged & got this log:
10:52 → English browser
10:53 → Spanish browser
Sep 30 10:52:18 exampleserver caddy[69635]: {"level":"debug","ts":1727693538.5530617,"logger":"events","msg":"event","name":"tls_get_certificate","id":"0dc2aa9c-6f8a-44c3-8da0-7400d17df7a9","origin":"tls","data":{"client_hello":{"CipherSuites":[39578,4865,4866,4867,49195,49199,49196,49200,52393,52392,49171,49172,156,157,47,53],"ServerName":"example.com","SupportedCurves":[31354,25497,29,23,24],"SupportedPoints":"AA==","SignatureSchemes":[1027,2052,1025,1283,2053,1281,2054,1537],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[56026,772,771],"RemoteAddr":{"IP":"185.40.40.40","Port":16378,"Zone":""},"LocalAddr":{"IP":"185.130.45.208","Port":443,"Zone":""}}}}
Sep 30 10:52:18 exampleserver caddy[69635]: {"level":"debug","ts":1727693538.5531778,"logger":"tls.handshake","msg":"choosing certificate","identifier":"example.com","num_choices":1}
Sep 30 10:52:18 exampleserver caddy[69635]: {"level":"debug","ts":1727693538.5532138,"logger":"tls.handshake","msg":"default certificate selection results","identifier":"example.com","subjects":["example.com"],"managed":true,"issuer_key":"acme-v02.api.letsencrypt.org-directory","hash":"9d35f5be3653753a2eb527d9ce46ee70ce1a7c013ddc7ec9381719cd9214cf15"}
Sep 30 10:52:18 exampleserver caddy[69635]: {"level":"debug","ts":1727693538.5532317,"logger":"tls.handshake","msg":"matched certificate in cache","remote_ip":"185.40.40.40","remote_port":"16378","subjects":["example.com"],"managed":true,"expiration":1735331521,"hash":"9d35f5be3653753a2eb527d9ce46ee70ce1a7c013ddc7ec9381719cd9214cf15"}
Sep 30 10:52:18 exampleserver caddy[69635]: {"level":"debug","ts":1727693538.6703682,"logger":"http.handlers.rewrite","msg":"rewrote request","request":{"remote_ip":"185.40.40.40","remote_port":"16378","client_ip":"185.40.40.40","proto":"HTTP/2.0","method":"GET","host":"example.com","uri":"/english/","headers":{"Pragma":["no-cache"],"Sec-Ch-Ua-Mobile":["?0"],"Cookie":["REDACTED"],"Priority":["u=0, i"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"],"Sec-Ch-Ua":["\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\""],"Accept-Language":["en,es;q=0.9,en-US;q=0.8"],"Cache-Control":["no-cache"],"Upgrade-Insecure-Requests":["1"],"Sec-Fetch-Site":["none"],"Sec-Fetch-Dest":["document"],"Sec-Ch-Ua-Platform":["\"Windows\""],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"],"Sec-Fetch-Mode":["navigate"],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br, zstd"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"example.com"}},"method":"GET","uri":"/english/index.php"}
Sep 30 10:52:18 exampleserver caddy[69635]: {"level":"debug","ts":1727693538.6704671,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"/run/php/php7.4-fpm.sock","total_upstreams":1}
Sep 30 10:52:18 exampleserver caddy[69635]: {"level":"debug","ts":1727693538.6707563,"logger":"http.reverse_proxy.transport.fastcgi","msg":"roundtrip","request":{"remote_ip":"185.40.40.40","remote_port":"16378","client_ip":"185.40.40.40","proto":"HTTP/2.0","method":"GET","host":"example.com","uri":"/english/index.php","headers":{"Sec-Ch-Ua":["\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\""],"Cache-Control":["no-cache"],"Upgrade-Insecure-Requests":["1"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"],"Sec-Fetch-Dest":["document"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Ch-Ua-Mobile":["?0"],"Cookie":["REDACTED"],"Sec-Fetch-Site":["none"],"X-Forwarded-For":["185.40.40.40"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"],"Sec-Fetch-Mode":["navigate"],"Pragma":["no-cache"],"Accept-Language":["en,es;q=0.9,en-US;q=0.8"],"Priority":["u=0, i"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["example.com"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"example.com"}},"env":{"DOCUMENT_URI":"/english/index.php","HTTP_SEC_CH_UA":"\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\"","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\"","HTTP_USER_AGENT":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36","REQUEST_SCHEME":"https","SCRIPT_FILENAME":"/var/www/mainsite/english/index.php","HTTP_COOKIE":"","HTTP_SEC_CH_UA_MOBILE":"?0","HTTP_ACCEPT_ENCODING":"gzip, deflate, br, zstd","HTTP_X_FORWARDED_HOST":"example.com","CONTENT_LENGTH":"","REMOTE_HOST":"185.40.40.40","REMOTE_USER":"","SERVER_PROTOCOL":"HTTP/2.0","HTTP_SEC_FETCH_USER":"?1","CONTENT_TYPE":"","HTTP_UPGRADE_INSECURE_REQUESTS":"1","HTTP_SEC_FETCH_MODE":"navigate","AUTH_TYPE":"","REQUEST_URI":"/english/","SERVER_PORT":"443","HTTP_CACHE_CONTROL":"no-cache","HTTP_X_FORWARDED_FOR":"185.40.40.40","REMOTE_IDENT":"","QUERY_STRING":"","REMOTE_ADDR":"185.40.40.40","HTTPS":"on","HTTP_SEC_FETCH_SITE":"none","SSL_CIPHER":"TLS_AES_128_GCM_SHA256","HTTP_ACCEPT":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","HTTP_PRAGMA":"no-cache","GATEWAY_INTERFACE":"CGI/1.1","REQUEST_METHOD":"GET","HTTP_HOST":"example.com","SCRIPT_NAME":"/english/index.php","SSL_PROTOCOL":"TLSv1.3","HTTP_PRIORITY":"u=0, i","HTTP_SEC_FETCH_DEST":"document","HTTP_ACCEPT_LANGUAGE":"en,es;q=0.9,en-US;q=0.8","HTTP_X_FORWARDED_PROTO":"https","PATH_INFO":"","REMOTE_PORT":"16378","SERVER_NAME":"example.com","SERVER_SOFTWARE":"Caddy/v2.8.4","DOCUMENT_ROOT":"/var/www/mainsite"},"dial":"/run/php/php7.4-fpm.sock","env":{"SERVER_SOFTWARE":"Caddy/v2.8.4","DOCUMENT_ROOT":"/var/www/mainsite","HTTP_SEC_FETCH_DEST":"document","HTTP_ACCEPT_LANGUAGE":"en,es;q=0.9,en-US;q=0.8","HTTP_X_FORWARDED_PROTO":"https","PATH_INFO":"","REMOTE_PORT":"16378","SERVER_NAME":"example.com","HTTP_USER_AGENT":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36","DOCUMENT_URI":"/english/index.php","HTTP_SEC_CH_UA":"\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\"","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\"","HTTP_SEC_CH_UA_MOBILE":"?0","REQUEST_SCHEME":"https","SCRIPT_FILENAME":"/var/www/mainsite/english/index.php","HTTP_COOKIE":"","SERVER_PROTOCOL":"HTTP/2.0","HTTP_SEC_FETCH_USER":"?1","HTTP_ACCEPT_ENCODING":"gzip, deflate, br, zstd","HTTP_X_FORWARDED_HOST":"example.com","CONTENT_LENGTH":"","REMOTE_HOST":"185.40.40.40","REMOTE_USER":"","CONTENT_TYPE":"","HTTP_UPGRADE_INSECURE_REQUESTS":"1","HTTP_SEC_FETCH_MODE":"navigate","HTTP_CACHE_CONTROL":"no-cache","AUTH_TYPE":"","REQUEST_URI":"/english/","SERVER_PORT":"443","HTTPS":"on","HTTP_SEC_FETCH_SITE":"none","HTTP_X_FORWARDED_FOR":"185.40.40.40","REMOTE_IDENT":"","QUERY_STRING":"","REMOTE_ADDR":"185.40.40.40","SCRIPT_NAME":"/english/index.php","SSL_PROTOCOL":"TLSv1.3","SSL_CIPHER":"TLS_AES_128_GCM_SHA256","HTTP_ACCEPT":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","HTTP_PRAGMA":"no-cache","GATEWAY_INTERFACE":"CGI/1.1","REQUEST_METHOD":"GET","HTTP_HOST":"example.com","HTTP_PRIORITY":"u=0, i"},"request":{"remote_ip":"185.40.40.40","remote_port":"16378","client_ip":"185.40.40.40","proto":"HTTP/2.0","method":"GET","host":"example.com","uri":"/english/index.php","headers":{"X-Forwarded-Host":["example.com"],"Priority":["u=0, i"],"X-Forwarded-Proto":["https"],"Upgrade-Insecure-Requests":["1"],"Sec-Ch-Ua":["\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\""],"Cache-Control":["no-cache"],"Sec-Ch-Ua-Mobile":["?0"],"Cookie":["REDACTED"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"],"Sec-Fetch-Dest":["document"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Pragma":["no-cache"],"Accept-Language":["en,es;q=0.9,en-US;q=0.8"],"Sec-Fetch-Site":["none"],"X-Forwarded-For":["185.40.40.40"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"],"Sec-Fetch-Mode":["navigate"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"example.com"}}}
Sep 30 10:52:18 exampleserver caddy[69635]: {"level":"debug","ts":1727693538.6735842,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"unix//run/php/php7.4-fpm.sock","duration":0.002980656,"request":{"remote_ip":"185.40.40.40","remote_port":"16378","client_ip":"185.40.40.40","proto":"HTTP/2.0","method":"GET","host":"example.com","uri":"/english/index.php","headers":{"Accept-Language":["en,es;q=0.9,en-US;q=0.8"],"Sec-Fetch-Site":["none"],"X-Forwarded-For":["185.40.40.40"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"],"Sec-Fetch-Mode":["navigate"],"Pragma":["no-cache"],"Priority":["u=0, i"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["example.com"],"Sec-Ch-Ua":["\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\""],"Cache-Control":["no-cache"],"Upgrade-Insecure-Requests":["1"],"Cookie":["REDACTED"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"],"Sec-Fetch-Dest":["document"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Ch-Ua-Mobile":["?0"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"example.com"}},"headers":{"Status":["500 Internal Server Error"],"Content-Type":["text/html; charset=UTF-8"]},"status":500}
Sep 30 10:53:02 exampleserver caddy[69635]: {"level":"debug","ts":1727693582.372326,"logger":"events","msg":"event","name":"tls_get_certificate","id":"285a203a-6f43-43d0-94df-29a3bf2ba7fe","origin":"tls","data":{"client_hello":{"CipherSuites":[4865,4866,4867],"ServerName":"example.com","SupportedCurves":[25497,29,23,24],"SupportedPoints":null,"SignatureSchemes":[1027,2052,1025,1283,2053,1281,2054,1537,513],"SupportedProtos":["h3"],"SupportedVersions":[772],"RemoteAddr":{"IP":"185.40.40.40","Port":56144,"Zone":""},"LocalAddr":{"IP":"185.130.45.208","Port":443,"Zone":""}}}}
Sep 30 10:53:02 exampleserver caddy[69635]: {"level":"debug","ts":1727693582.3724651,"logger":"tls.handshake","msg":"choosing certificate","identifier":"example.com","num_choices":1}
Sep 30 10:53:02 exampleserver caddy[69635]: {"level":"debug","ts":1727693582.3725145,"logger":"tls.handshake","msg":"default certificate selection results","identifier":"example.com","subjects":["example.com"],"managed":true,"issuer_key":"acme-v02.api.letsencrypt.org-directory","hash":"9d35f5be3653753a2eb527d9ce46ee70ce1a7c013ddc7ec9381719cd9214cf15"}
Sep 30 10:53:02 exampleserver caddy[69635]: {"level":"debug","ts":1727693582.3725333,"logger":"tls.handshake","msg":"matched certificate in cache","remote_ip":"185.40.40.40","remote_port":"56144","subjects":["example.com"],"managed":true,"expiration":1735331521,"hash":"9d35f5be3653753a2eb527d9ce46ee70ce1a7c013ddc7ec9381719cd9214cf15"}
Sep 30 10:53:02 exampleserver caddy[69635]: {"level":"debug","ts":1727693582.4932623,"logger":"http.handlers.rewrite","msg":"rewrote request","request":{"remote_ip":"185.40.40.40","remote_port":"56144","client_ip":"185.40.40.40","proto":"HTTP/3.0","method":"GET","host":"example.com","uri":"/spanish/","headers":{"Pragma":["no-cache"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8"],"Sec-Fetch-Dest":["document"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Cache-Control":["no-cache"],"Sec-Fetch-User":["?1"],"Sec-Ch-Ua-Mobile":["?0"],"Sec-Gpc":["1"],"Accept-Language":["es-ES,es;q=0.6"],"Sec-Fetch-Site":["none"],"Sec-Fetch-Mode":["navigate"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Priority":["u=0, i"],"Upgrade-Insecure-Requests":["1"],"Sec-Ch-Ua":["\"Brave\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\""]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h3","server_name":"example.com"}},"method":"GET","uri":"/spanish/index.php"}
Sep 30 10:53:02 exampleserver caddy[69635]: {"level":"debug","ts":1727693582.4933908,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"/run/php/php7.4-fpm.sock","total_upstreams":1}
Sep 30 10:53:02 exampleserver caddy[69635]: {"level":"debug","ts":1727693582.4937983,"logger":"http.reverse_proxy.transport.fastcgi","msg":"roundtrip","request":{"remote_ip":"185.40.40.40","remote_port":"56144","client_ip":"185.40.40.40","proto":"HTTP/3.0","method":"GET","host":"example.com","uri":"/spanish/index.php","headers":{"Sec-Fetch-Mode":["navigate"],"Sec-Ch-Ua-Mobile":["?0"],"Priority":["u=0, i"],"Sec-Fetch-Site":["none"],"Sec-Gpc":["1"],"Accept-Language":["es-ES,es;q=0.6"],"Sec-Ch-Ua":["\"Brave\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\""],"Sec-Ch-Ua-Platform":["\"Windows\""],"X-Forwarded-For":["185.40.40.40"],"X-Forwarded-Proto":["https"],"Cache-Control":["no-cache"],"Upgrade-Insecure-Requests":["1"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"],"Sec-Fetch-Dest":["document"],"X-Forwarded-Host":["example.com"],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Pragma":["no-cache"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h3","server_name":"example.com"}},"env":{"REMOTE_IDENT":"","DOCUMENT_ROOT":"/var/www/mainsite","SCRIPT_FILENAME":"/var/www/mainsite/spanish/index.php","HTTP_PRAGMA":"no-cache","HTTP_SEC_FETCH_DEST":"document","HTTP_X_FORWARDED_HOST":"example.com","HTTP_SEC_CH_UA":"\"Brave\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\"","REMOTE_HOST":"185.40.40.40","REMOTE_PORT":"56144","SSL_CIPHER":"TLS_AES_128_GCM_SHA256","HTTP_SEC_FETCH_USER":"?1","HTTP_SEC_FETCH_MODE":"navigate","HTTP_ACCEPT_LANGUAGE":"es-ES,es;q=0.6","HTTP_X_FORWARDED_PROTO":"https","HTTP_HOST":"example.com","REQUEST_URI":"/spanish/","HTTP_PRIORITY":"u=0, i","HTTP_SEC_FETCH_SITE":"none","HTTP_ACCEPT_ENCODING":"gzip, deflate, br, zstd","HTTP_SEC_GPC":"1","CONTENT_TYPE":"","PATH_INFO":"","REMOTE_ADDR":"185.40.40.40","DOCUMENT_URI":"/spanish/index.php","SERVER_SOFTWARE":"Caddy/v2.8.4","HTTPS":"on","HTTP_CACHE_CONTROL":"no-cache","HTTP_ACCEPT":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8","GATEWAY_INTERFACE":"CGI/1.1","REMOTE_USER":"","REQUEST_SCHEME":"https","SERVER_NAME":"example.com","HTTP_USER_AGENT":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36","CONTENT_LENGTH":"","QUERY_STRING":"","SERVER_PROTOCOL":"HTTP/3.0","SERVER_PORT":"443","AUTH_TYPE":"","REQUEST_METHOD":"GET","SSL_PROTOCOL":"TLSv1.3","HTTP_X_FORWARDED_FOR":"185.40.40.40","SCRIPT_NAME":"/spanish/index.php","HTTP_SEC_CH_UA_MOBILE":"?0","HTTP_UPGRADE_INSECURE_REQUESTS":"1","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\""},"dial":"/run/php/php7.4-fpm.sock","env":{"HTTP_CACHE_CONTROL":"no-cache","HTTP_ACCEPT":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8","GATEWAY_INTERFACE":"CGI/1.1","REMOTE_USER":"","REQUEST_SCHEME":"https","SERVER_NAME":"example.com","SERVER_SOFTWARE":"Caddy/v2.8.4","HTTPS":"on","CONTENT_LENGTH":"","QUERY_STRING":"","SERVER_PROTOCOL":"HTTP/3.0","SERVER_PORT":"443","HTTP_USER_AGENT":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36","AUTH_TYPE":"","REQUEST_METHOD":"GET","SSL_PROTOCOL":"TLSv1.3","SCRIPT_NAME":"/spanish/index.php","HTTP_SEC_CH_UA_MOBILE":"?0","HTTP_UPGRADE_INSECURE_REQUESTS":"1","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\"","HTTP_X_FORWARDED_FOR":"185.40.40.40","REMOTE_IDENT":"","DOCUMENT_ROOT":"/var/www/mainsite","SCRIPT_FILENAME":"/var/www/mainsite/spanish/index.php","HTTP_X_FORWARDED_HOST":"example.com","HTTP_SEC_CH_UA":"\"Brave\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\"","REMOTE_HOST":"185.40.40.40","REMOTE_PORT":"56144","SSL_CIPHER":"TLS_AES_128_GCM_SHA256","HTTP_SEC_FETCH_USER":"?1","HTTP_PRAGMA":"no-cache","HTTP_SEC_FETCH_DEST":"document","HTTP_X_FORWARDED_PROTO":"https","HTTP_HOST":"example.com","REQUEST_URI":"/spanish/","HTTP_PRIORITY":"u=0, i","HTTP_SEC_FETCH_SITE":"none","HTTP_SEC_FETCH_MODE":"navigate","HTTP_ACCEPT_LANGUAGE":"es-ES,es;q=0.6","CONTENT_TYPE":"","PATH_INFO":"","REMOTE_ADDR":"185.40.40.40","DOCUMENT_URI":"/spanish/index.php","HTTP_ACCEPT_ENCODING":"gzip, deflate, br, zstd","HTTP_SEC_GPC":"1"},"request":{"remote_ip":"185.40.40.40","remote_port":"56144","client_ip":"185.40.40.40","proto":"HTTP/3.0","method":"GET","host":"example.com","uri":"/spanish/index.php","headers":{"Sec-Gpc":["1"],"Accept-Language":["es-ES,es;q=0.6"],"Sec-Ch-Ua":["\"Brave\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\""],"X-Forwarded-Proto":["https"],"Cache-Control":["no-cache"],"Upgrade-Insecure-Requests":["1"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8"],"Sec-Ch-Ua-Platform":["\"Windows\""],"X-Forwarded-For":["185.40.40.40"],"X-Forwarded-Host":["example.com"],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Pragma":["no-cache"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"],"Sec-Fetch-Dest":["document"],"Sec-Ch-Ua-Mobile":["?0"],"Priority":["u=0, i"],"Sec-Fetch-Site":["none"],"Sec-Fetch-Mode":["navigate"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h3","server_name":"example.com"}}}
Sep 30 10:53:02 exampleserver caddy[69635]: {"level":"debug","ts":1727693582.4968894,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"unix//run/php/php7.4-fpm.sock","duration":0.003412965,"request":{"remote_ip":"185.40.40.40","remote_port":"56144","client_ip":"185.40.40.40","proto":"HTTP/3.0","method":"GET","host":"example.com","uri":"/spanish/index.php","headers":{"Sec-Ch-Ua":["\"Brave\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\""],"Sec-Gpc":["1"],"Accept-Language":["es-ES,es;q=0.6"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8"],"Sec-Ch-Ua-Platform":["\"Windows\""],"X-Forwarded-For":["185.40.40.40"],"X-Forwarded-Proto":["https"],"Cache-Control":["no-cache"],"Upgrade-Insecure-Requests":["1"],"Pragma":["no-cache"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"],"Sec-Fetch-Dest":["document"],"X-Forwarded-Host":["example.com"],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Fetch-Site":["none"],"Sec-Fetch-Mode":["navigate"],"Sec-Ch-Ua-Mobile":["?0"],"Priority":["u=0, i"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h3","server_name":"example.com"}},"headers":{"Status":["500 Internal Server Error"],"Content-Type":["text/html; charset=UTF-8"]},"status":500}
Is there anything else I could try?
Thanks