Error updating old caddy version to V1 on a server

1. My Caddy version (caddy -version):

Caddy 0.10.2

2. How I run Caddy:

As an service on Linux (systemd).

a. System environment:

CentOS Linux release 7.2.1511 (Core)

c. Service/unit/compose file:

[Unit]
Description=Caddy webserver
Documentation=https://caddyserver.com/
After=network.target

[Service]
User=nginx
Group=nginx
LimitNOFILE=100000
ExecStart=/bin/caddy -agree -email mymail@mail.com -pidfile=/var/run/caddy.pid  -conf=/var/bmss/caddy.conf -log=/var/bmss/errorlog/error.log
ExecReload=/bin/kill -USR1 $MAINPID
StartLimitInterval=60
ReadWriteDirectories=/home/nginx

[Install]
WantedBy=multi-user.target

d. My complete Caddyfile:

domain1.com, www.domain1.com, domain2.com, www.domain2.com (and 3000 more domains later...) {
    proxy / localhost:8080 {
        transparent
    }

    push

    tls {
        max_certs 2000
    }
}

http://*  *.devsite.se {
    proxy / localhost:8080 {
        transparent
    }
	
    header / {
        Via "1.1 google"
    }

	timeouts 0
    
    tls off    
}

3. The problem I’m having:

I’ve placed the new caddy binary file in bin folder and restarting the caddy service. After the restart it says the service failed and exited.

4. Error messages and/or full log output:

I get multiple Warnings with following text: WARNING: The max_certs subdirective is now deprecated and offers no protection; please use ask instead.
After that I get: caddy.service: main process exited, code=exited, status=1/FAILURE
Unit caddy.service entered failed state. caddy.service failed.

5. What I already tried:

I tried to change max_certs to: “ask http://localhost:8080/allowed” because of the warning text, but the service still fails with the new caddy version.

I believe I may have solved this issue… Replying when it’s fully solved.

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