1. Caddy version (caddy version
):
2.4.6
2. How I run Caddy:
I’m not running in production yet. Testing with a trivial case, one of 41 virtual domains, one of the few with a dedicated IP address. Running with log-level debug, in foreground (“caddy run”).
a. System environment:
CentOS 7.9.2003. Not yet integrated with systemd.
b. Command:
caddy run
c. Service/unit/compose file:
(none yet)
d. My complete Caddyfile or JSON config:
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
#:80 {
# # Set this path to your site's directory.
# root * /usr/share/caddy
#
# # Enable the static file server.
# file_server
#
# # Another common task is to set up a reverse proxy:
# # reverse_proxy localhost:8080
#
# # Or serve a PHP site through php-fpm:
# # php_fastcgi localhost:9000
#}
{
debug
}
# groups.queernet.org
groups.queernet.org {
log {
output file /var/log/caddy/groups.queernet.org-access.log
level debug
}
log {
output file /var/log/caddy/groups.queernet.org-error.log
level error
}
route /images* {
uri strip_prefix /images
file_server {
root /usr/share/sympa/static_content
}
}
root * /var/lib/sympa/list_data/list-data/groups.queernet.org
php_fastcgi unix//run/sympa/wwsympa.socket
# Legacy mailman redirects
#redir /pipermail https://lists.noisebridge.net{uri}
#redir /mailman https://lists.noisebridge.net{uri}
#rewrite / /index.php?title={path}
redir / /sympa.php
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile
3. The problem I’m having:
curl -v http://groups.queernet.org
* About to connect() to groups.queernet.org port 80 (#0)
* Trying 216.252.162.114...
* Connected to groups.queernet.org (216.252.162.114) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: groups.queernet.org
> Accept: */*
>
< HTTP/1.1 308 Permanent Redirect
< Connection: close
< Location: https://groups.queernet.org/
< Server: Caddy
< Date: Sun, 24 Apr 2022 00:30:42 GMT
< Content-Length: 0
<
* Closing connection 0
4. Error messages and/or full log output:
2022/04/24 00:07:17.547 error http.log.access.log1 handled request {"request": {"remote_addr": "97.113.197.229:59731", "proto": "HTTP/2.0", "method": "GET", "host": "groups.queernet.org", "uri": "/sympa.php", "headers": {"Accept-Encoding": ["gzip, deflate, br"], "User-Agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"], "Accept-Language": ["en-US,en;q=0.9"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "proto_mutual": true, "server_name": "groups.queernet.org"}}, "common_log": "97.113.197.229 - - [23/Apr/2022:17:07:17 -0700] \"GET /sympa.php HTTP/2.0\" 421 1", "user_id": "", "duration": 0.352837206, "size": 1, "status": 421, "resp_headers": {"Server": ["Caddy"], "Status": ["421 Misdirected Request"]}}
2022/04/24 00:07:17.548 error http.log.access.log1 handled request {"request": {"remote_addr": "97.113.197.229:59731", "proto": "HTTP/2.0", "method": "GET", "host": "groups.queernet.org", "uri": "/sympa.php", "headers": {"Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"], "User-Agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "proto_mutual": true, "server_name": "groups.queernet.org"}}, "common_log": "97.113.197.229 - - [23/Apr/2022:17:07:17 -0700] \"GET /sympa.php HTTP/2.0\" 421 1", "user_id": "", "duration": 0.402926325, "size": 1, "status": 421, "resp_headers": {"Server": ["Caddy"], "Status": ["421 Misdirected Request"]}}
2022/04/24 00:12:34.373 error http.log.access.log1 handled request {"request": {"remote_addr": "97.113.197.229:59886", "proto": "HTTP/2.0", "method": "GET", "host": "groups.queernet.org", "uri": "/sympa.php", "headers": {"User-Agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "proto_mutual": true, "server_name": "groups.queernet.org"}}, "common_log": "97.113.197.229 - - [23/Apr/2022:17:12:34 -0700] \"GET /sympa.php HTTP/2.0\" 421 1", "user_id": "", "duration": 0.354340506, "size": 1, "status": 421, "resp_headers": {"Server": ["Caddy"], "Status": ["421 Misdirected Request"]}}