caddy-exec icon indicating copy to clipboard operation
caddy-exec copied to clipboard

Redirect output to a file

Open richcorbs opened this issue 1 year ago • 0 comments

I'm trying to redirect the output of a command to a file so that it can be served. Is this possible?

  route /domains {
    root * /var/www/localhost
    exec /bin/ls /var/www > /var/www/localhost/domains {
      pass_thru
    }
    file_server /domains
  }

The /var/www/localhost/domains file exists but never gets populated and there are no errors on the server.

richcorbs avatar May 07 '24 02:05 richcorbs