1. Caddy version (caddy version
):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
2. How I run Caddy:
Classic rpm install
a. System environment:
CentOS, via systemctl/service
b. Command:
-
c. Service/unit/compose file:
-
d. My complete Caddyfile or JSON config:
www.website.fr,
website.fr {
root * /var/www/website.fr/prod
php_fastcgi 127.0.0.1:9004
file_server
encode zstd gzip
log {
output file /var/log/website.access.log
format single_field common_log
}
@cache {
not header_regexp Cookie "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in"
not path_regexp "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(index)?.xml|[a-z0-9-]+-sitemap([0-9]+)?.xml)"
not method POST
not expression {query} != ''
}
route @cache {
try_files /wp-content/cache/cache-enabler/{host}{uri}/https-index.html /wp-content/cache/cache-enabler/{host}{uri}/index.html {path} {path}/index.php?{query}
}
}
3. The problem I’m having:
I’m searching a way to get the realip behind cloudflare on my log file.
4. Error messages and/or full log output:
5. What I already tried:
I tried to build a specific caddy version with xcaddy but the realip cloudflare
thing did not work.