Caddy reverse proxy configuration for multiple internal webservers

1. Caddy version (caddy version):


2. How I run Caddy:

a. System environment:

Ubuntu 20.04 LTS, systemd

b. Command:

printf "[Unit]\\n\n[Service]\nLimitNOFILE=1048576\nExecStart=/usr/local/bin/caddy reverse-proxy --from --to\nRestart=always\nStartLimitInterval=600\n\n[Install]\" | sudo tee /etc/systemd/system/caddy.service

systemctl start caddy

c. Service/unit/compose file:


ExecStart=/usr/local/bin/caddy reverse-proxy --from --to


d. My complete Caddyfile or JSON config:


3. The problem I’m having:

I have another webserver running on port 8081, I do not know how to change the systemd configuration to include for example:
add another --from --to to the file?

4. Error messages and/or full log output:

I do not know where to start.

5. What I already tried:

trial and error with no luck.

6. Links to relevant resources:

At this point, you will have to change your setup from running Caddy with flags to using configuration file, such as Caddyfile or JSON. The Caddyfile is a good starting point and simpler to handle. You should be able to pick it up easily and configure your server to suit your needs.

1 Like

all running now…thank you

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.