1. My Caddy version (caddy C -version):
(devel) [2.0 beta 10]
2. How I run Caddy:
a. System environment:
DigitalOcean VPS running Ubuntu 18.10 with open incoming ports 80 and 443
b. Command:
bill@Bill2:~$ caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile
validate: parsing caddyfile tokens for ‘root’: Caddyfile:2 - Error during parsing: Wrong argument count or unexpected line ending after ‘/var/www/wtrenker.com’
The permissions on /etc/caddy/Caddyfile are:
bill@Bill2:~/testflask$ ls -l /etc/caddy/Caddyfile
-rw-r–r-- 1 root root 85 Nov 21 22:17 /etc/caddy/Caddyfile
The Caddy executable is stored in /usr/local/bin.
c. Service/unit/compose file:
I am currently establishing a caddy.service for systemd. I have attempted to use systemctl to start caddy but I always get the parsing error for Caddyfile. I also get the same error when I try to start caddy directly from the command line.
d. My complete Caddyfile:
bill@Bill2:~$ cat /etc/caddy/Caddyfile
wtrenker.com {
root /var/www/wtrenker.com
reverse_proxy localhost:5000 { }
}
3. The problem I’m having:
I am following the instructions at the following caddyserver link:
https://github.com/caddyserver/caddy/tree/master/dist/init/linux-systemd
So far I believe I have carefully set up everything required by the documentation (of course it is all too easy to miss a keystroke).
4. Error messages and/or full log output:
(see above)
5. What I already tried:
When I link caddy into my test directory, validate works**!!!**
bill@Bill2:~/testflask$ ./caddy validate --config Caddyfile --adapter caddyfile
2019/11/21 22:48:04.403 INFO admin admin endpoint started {“address”: “localhost:2019”, “enforce_origin”: false, “origins”: [“localhost:2019”]}
Valid configuration
But when I run the caddy linked into my test directory and refer to the documented location for the Caddyfile, I get the error again:
bill@Bill2:~/testflask$ ./caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile
validate: parsing caddyfile tokens for ‘root’: Caddyfile:2 - Error during parsing: Wrong argument count or unexpected line ending after ‘/var/www/wtrenker.com’
I have also experimented with the permissions on the Caddyfile but with no success.
6. Links to relevant resources:
I am getting excited about Caddy as I feel close to putting it into production, replacing Nginx.
Thanks in advance for any help you can provide. Bill