Caddy not logging to stdout, stderr, or log file

I’m attempting to get Caddy to work in place of my existing nginx setup as I quite like the built in cert configuration, however I’ve suddenly become unable to make any requests to caddy without it either 403 or 404’ing my request without any log messages.

It initially worked as a “Hello World” test, but once I configured things such as a reverse proxy on a subdomain it just suddenly stopped working. All the rewrites occur correctly, and it correctly redirects to HTTPS versions of my addresses, but nothing is ever logged. If specified, a log file will be created, but forever empty.

I am running Caddy on the same machine I’m making the requests from, and as stated it initially worked using my domain name just as nginx is still happily doing. If I attempt to make a request to localhost or 127.0.0.1 however, I do get a log message, stating there is no website under that address, but I only get that log when running Caddy with the -log flag.

My caddyfile is as follows, with my domain name replaced:

example.ca {
	root C:\caddy\html
	gzip
	log stdout
	errors
}

plex.example.ca {
	root C:\caddy\html
	log stdout
	errors
	rewrite / {
		regexp (.*)
		to /web{1}
	}
	proxy / localhost:32400 {
		transparent
	}
}

sonarr.example.ca {
	log stdout
	errors
	proxy / localhost:38082 {
		transparent
	}
}

If I request plex.example.ca, it rewrites the url regardless of if the rewrite statement is defined to /web/index.html as plex expects, but I still get a 404.

Finally, I have also tested access from the internet via my cellphone on it’s data connection and I get the same results.

I’m at a complete loss, as nothing I’ve done has worked and I can’t seem to find anyone with a similar issue. Any help would be greatly appreciated.

It appears I have solved the root of issue, as far as I can tell.

After inspecting netstat, I discovered that VMWare Workstation was binding to port 443 for it’s VM Sharing service (that default enabled, for whatever reason.) After disabling that service, and restarting Caddy, everything worked as I expected and flawlessly.

I guess VM Ware was just intercepting all SSH traffic, which would explain why the redirects worked.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.