Tagged with “Caddy” (2)

Today I submitted a question to the Caddy Community Forum to ask about the problem that I had with my static files and only a few hours later, not one but two people submitted suggestions on how to solve it.

In the end, it was mostly me not understanding how permissions work in linux. Anyway, I learned a few things about linux and also started to really appreciate the simplicity of configuring caddy.

This is what I ended up with:

# Mirage, PostgreSQL
inhji.de {
  # handle_path will cut out the path is handling to avoid duplicate upload folders in the resulting path
  handle_path /uploads/* {
    root * /var/www/mirage/uploads

  handle {
    reverse_proxy * localhost:9100

  import security_headers

I also moved my static files to /var/www and set proper permissions.

Now my migration of mirage is complete and I can turn off the old VPS. Next up would be getting my gitea setup in order..

Okay, my move to a smaller VPS is almost done. I scrapped my public gitea instance and will be using the one on my raspi (or my diskstation). I moved mirage over, and gave Caddy a try. Everything working fine (a lot less configuration so far, plus everything is in one file), except for serving static files from another directory. Cannot figure it out.