Closed ericswpark closed 1 year ago
I think maybe it is a good idea to remove the warning and use that domain as serverName as it will be super repetitive cc @M4tteoP
On Sun, 11 Jun 2023, 03:52 Eric Park, @.***> wrote:
I'm getting the following line in my logs when I access my sites:
{"level":"warn","ts":1686448129.858539,"logger":"http.handlers.waf","msg":"failed to parse server name","tx_id":"___","error":"failed to parse server name from authority \"sub.example.com\", address sub.example.com: missing port in address"}
I've noticed that some sites work perfectly fine with this warning while other sites will just throw up a blank page with a 200 response code.
Should I be worried about this warning? Is there a way to fix it?
— Reply to this email directly, view it on GitHub https://github.com/corazawaf/coraza-caddy/issues/70, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXOYASYWRZNAZ66ODIEALTXKUQETANCNFSM6AAAAAAZCAPUPI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
It seems like this warning message is not indicative of problems with using Coraza with some services I reverse-proxy to. I'll edit this post accordingly and create a separate bug report.
I build caddy today as
--with github.com/corazawaf/coraza-caddy@main \
--with github.com/corazawaf/coraza-coreruleset"
but still there are plenty of messages with"logger":"http.handlers.waf","msg":"failed to parse server name"
Try latest commit. Parsing of server should not fail anymore as per https://github.com/corazawaf/coraza-caddy/pull/72
Not sure how to build it properly with xcaddy
xcaddy build \
--with github.com/caddy-dns/cloudflare \
--with github.com/caddyserver/transform-encoder \
--with github.com/corazawaf/coraza-caddy@61bb4b1 \
--with github.com/corazawaf/coraza-coreruleset"
[INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/corazawaf/coraza-caddy@61bb4b1
github.com/caddyserver/caddy/v2@cbf16f6 ", "go: github.com/corazawaf/coraza-caddy@61bb4b1:
github.com/corazawaf/coraza-caddy@v1.2.3-0.20230611210624-61bb4b1be56e: invalid version:
go.mod has post-v1 module path \"github.com/corazawaf/coraza-caddy/v2\" at revision 61bb4b1be56e"
@Aljutor try using @master
With @master or @main I still see "logger":"http.handlers.waf","msg":"failed to parse server name"
Some shenanigans with versioning perhaps.
Try latest commit. Parsing of server should not fail anymore as per https://github.com/corazawaf/coraza-caddy/pull/72.
Also use github.com/corazawaf/coraza-caddy/v2@61bb4b1 and finally you don't need to include coraza-coreruleset.
Hi,
I'm on the latest build and still I get a lot of these warnings.
Caddy v2.8.4 coraza-caddy@master
{ "directives": "SecRuleEngine On", "handler": "waf", "include": [ "@coraza.conf-recommended", "@crs-setup.conf.example", "@owasp_crs/*.conf" ], "load_owasp_crs": true }
Am I missing something?
Thanks
I'm getting the following line in my logs when I access my sites:
I've noticed that some sites work perfectly fine with this warning while other sites will just throw up a blank page with a 200 response code.(Edit: warning message not indicative of this problem)Should I be worried about this warning? Is there a way to fix it?
Here is a part of my
Caddyfile
: