1. Caddy version (caddy version
):
v2.4.6 h1:HGkGICFGvyrodcqOOclHKfvJC0qTU7vny/7FhYp9hNw=
2. How I run Caddy:
Caddyfile
foundry.odragaoverde.com {
# PROXY ALL REQUEST TO PORT 30000
reverse_proxy localhost:30000
encode zstd gzip
}
link.odragaoverde.com {
root /home/ubuntu/www/link
gzip
}
a. System environment:
Ubuntu 20.04
b. Command:
$ sudo systemctl start caddy
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:
# A CONFIG SECTION FOR YOUR HOSTNAME
foundry.odragaoverde.com {
# PROXY ALL REQUEST TO PORT 30000
reverse_proxy localhost:30000
encode zstd gzip
}
link.odragaoverde.com {
root /home/ubuntu/www/link
gzip
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile
3. The problem Iâm having:
I am trying to host a website in a oracle cloud machine that I use as well with a reverse proxy.
The reverse proxy part was working as intended when I donât include the second block (link.odragaoverde.com) I have been readying the documentation and I have no idea what might be wrong all I get is âJob for caddy.service failed because the control process exited with error code.
See âsystemctl status caddy.serviceâ and âjournalctl -xeâ for details.â
4. Error messages and/or full log output:
â caddy.service - Caddy
Loaded: loaded (/lib/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-02-11 12:58:45 UTC; 41s ago
Docs: Welcome â Caddy Documentation
Process: 80082 ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile (code=exited, status=1/FAILURE)
Main PID: 80082 (code=exited, status=1/FAILURE)
Feb 11 12:58:45 foundry caddy[80082]: HOME=/var/lib/caddy
Feb 11 12:58:45 foundry caddy[80082]: LOGNAME=caddy
Feb 11 12:58:45 foundry caddy[80082]: USER=caddy
Feb 11 12:58:45 foundry caddy[80082]: INVOCATION_ID=5ec29c94c5234342a0c35b8d7cd0307a
Feb 11 12:58:45 foundry caddy[80082]: JOURNAL_STREAM=8:1534563
Feb 11 12:58:45 foundry caddy[80082]: {âlevelâ:âinfoâ,âtsâ:1644584325.4215896,âmsgâ:âusing provided configurationâ,âconfig_fileâ:"/etc/caddy/Caddyfile",âconfig_adapterâ:""}
Feb 11 12:58:45 foundry caddy[80082]: run: adapting config using caddyfile: parsing caddyfile tokens for ârootâ: /etc/caddy/Caddyfile:12 - Error during parsing: Wrong argument count or unexpected line ending after ârootâ
Feb 11 12:58:45 foundry systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Feb 11 12:58:45 foundry systemd[1]: caddy.service: Failed with result âexit-codeâ.
Feb 11 12:58:45 foundry systemd[1]: Failed to start Caddy.
5. What I already tried:
I am still pretty new to all these, I tried reading the documentation, rewrote Caddyfile several times, checked the syntax.