Caddy trying to connect to a different IP address

1. Caddy version (caddy version):

Just downloaded latest version today. Not sure where to check for version number.

2. How I run Caddy:

a. System environment:


b. Command:


c. Service/unit/compose file:

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.

d. My complete Caddyfile or JSON config:

server.ser:80 {
root * /www/
server.ser:443 {
root * /www/

3. The problem I’m having:

How/why is Caddy checking one of my other servers? This server that I am running it on server.ser has a different IP address, the IP address below is one of my other servers, weird. See message below

4. Error messages and/or full log output:

2021/07/21 16:13:21.467 ERROR http.log.error Stat \www\streams\ : invalid argument {“request”: {“remote_addr”: “”, “proto”: “HTTP/1.1”, “method”: “GET”, “host”: “server.ser”, “uri”: "/streams/%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00

5. What I already tried:

Updated to the latest Caddy version
Tried ipconfig /flushdns
Pinging server.ser externally gives the correct IP Address

6. Links to relevant resources:

remote_addr is IP address of the incoming request, not the IP the server is listening on.

TCP packets carry their source IP address so that a response can be sent back to the same address.

That error is because the URL of the request was bad and didn’t point to a real file on your machine. If you’re running it on Windows, then you probably wanted something like this as your site root:

root * C:\www

Run the command caddy.exe version to see the version.

1 Like

Ah, yes, okay, that makes sense now as I do have the other server accessing files on this server. So I can also change root * /www/ to root * C:\www in my config file to stop that message from displaying? Thank you

It depends where your files you want to serve are located. Forward slashes are unix-style paths though. Use the path to your site on your windows machine.

Sorry, what I meant to ask was if there is a way to suppress that particular error message? I don’t need it displayed in the Caddy log window as I know there may be files missing at times which is fine for my purpose. Thx

Not really. It’s a valid error. If you’re making requests with a really long file path with null bytes, then you’re gonna get an error.

Okay, no problem, thanks

This topic was automatically closed after 30 days. New replies are no longer allowed.