So I got Seafile up and running on a virtual machine of mine and I am trying to use caddy as a reverse proxy for it but the problem is that its not on local host of Seafile its in its own virtual machine. I can access the Seafile interface and download the doc but when I want to upload something to the server I get a network error and I believe it has to do with not specifying what the /media directory should proxy to. Now everything I look up on Caddy(even NGINX and Apache for that matter) as a reverse proxy for Seafile I always get examples for them on the local host. So I am wondering if anyone knows how to set up my caddy file to proxy the location of the media directory to a different host from local?
Here is my caddyfile below never mind the /request proxy thats going to another site.
Almost all configuration applies equally to localhost and external hosts. The only difference in Caddy’s configuration should be that the upstream server you’re proxying to is specified as the external host instead of localhost or 127.0.0.1 etc.
You’ll need to make sure that all the URIs that Seafile uses are properly proxied to the Seafile host.
There needs to be some kind of web server serving up the files. Either Caddy needs to do it off disk, or Caddy needs to proxy to a webserver that does serve them off disk.
Whether that’s Seafile’s built in webserver and you proxy from Caddy to that, or whether you set up another Caddy on the Seafile host - I’m not sure what’s most feasible.
It’s just a consequence of having the files on a different host.
Far more complicated proxy chains have been deployed in the past, and will be deployed in future. I frequently proxy from Caddy to other Caddies or nginx’s or Apaches or just other Go web apps in Docker containers.