Getting status 308 despite trying everything

1. Caddy version:

v2.6.3 h1:QRVBNIqfpqZ1eJacY44I6eUC1OcxQ8D04EKImzpj7S8=

2. How I installed, and run Caddy:

I installed caddy for Ubuntu as per official documentation, running it through systemd

a. System environment:

Ubuntu 22.04.1 LTS, systemd

b. Command:

sudo systemctl start caddy

c. Service/unit/compose file:


ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force


d. My complete Caddy config:

}  {
        # Set this path to your site's directory.
        root * /usr/share/caddy

        # Enable the static file server.

        # Another common task is to set up a reverse proxy:
        # reverse_proxy localhost:8080
         handle /api/* {
        # Or serve a PHP site through php-fpm:
        # php_fastcgi localhost:9000

3. The problem I’m having:

Basically all I want is to point out to backend, above specified caddyfile is result of what I find on the internet, I started with caddy command:

sudo caddy reverse-proxy --from --to localhost:7100

All of attempts ended up same, I was getting error 308, permanently redirected

BUT the site on port 80 works, for some reason

4. Error messages and/or full log output:

Paste logs/commands/output here.
There isn't anything there

5. What I already tried:

Well I’ve tried a lot of edits of the caddyfile, I’ve tried ever Nginx where I was getting err 301, I tried contact client, if they don’t have something bad done in cloudflare console and obviously a lot of searching what is happening. Maybe I am ignorant, but couldn’t find anything useful, which would work

6. Links to relevant resources:

I’m sure that’s not true. Did you follow the instructions to find your logs from journalctl? Did you enable the debug global option?

Are you using http:// or https://? Your site is being served over HTTPS. I can load just fine.

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