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 {
  # 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..