Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

Usage with Caddy #8

Open
UndarkAido opened this issue Mar 31, 2021 · 3 comments
Open

Usage with Caddy #8

UndarkAido opened this issue Mar 31, 2021 · 3 comments

Comments

@UndarkAido
Copy link

UndarkAido commented Mar 31, 2021

I've been trying to set this up with Caddy instead of NGINX, this is what I have so far:

:7680 {
    reverse_proxy * :7682 {
        header_up Host {http.request.host}
    }
    @api path /api/* /media/*
    reverse_proxy @api :7681 {
        header_up Host backend
        header_up X-Real-IP {http.request.remote}
    }
    @protected_media {
        remote_ip 127.0.0.1
        path /protected_media*
    }
    file_server @protected_media {
        root /var/lib/librephotos/
    }
    @original {
        remote_ip 127.0.0.1
        path /original*
    }
    handle @original {
        uri strip_prefix /original
        file_server {
            root /var/lib/librephotos/data/
        }
    }
    @nextcloud_original {
        remote_ip 127.0.0.1
        path /nextcloud_original*
    }
    handle @nextcloud_original {
        uri strip_prefix /nextcloud_original
        file_server {
            root /var/lib/librephotos/data/nextcloud_media/
        }
    }
}

The page loads but no images are loading. It also doesn't redirect to /. Maybe the lack of uwsgi is the problem with the images?

@tomamplius
Copy link
Contributor

@UndarkAido cat you give me all instruction to install caddy?
Like

  • apt get install caddy
  • cp /etc/caddy/
  • ....

@UndarkAido
Copy link
Author

@UndarkAido
Copy link
Author

Oh- also the three file redirects aren't internal, I'm not sure if Caddy has an equivalent. This isn't really my area of expertise lol.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants