404 error File Browser installation on Ubuntu

I’m trying to run Caddy v1.0.4 on an Ubuntu server 18.04 with File Browser https://filebrowser.xyz/ to access files and folders over the Internet with Https

According to the File Browser instructions it’s easy to set up with Caddy https://filebrowser.xyz/installation/caddy using Proxy command

I can access my File Browser on the server with fine

So my Caddy file is


        proxy /data/media :8080 {
            without /data/media
            header_upstream X-Script-Name /data/media
       log /var/log/caddy.log

Running Caddy directly from the command line after sudo su

gives me a 404 error when I go to myhomeserver.changeip.net

the log just shows

2020/02/10 14:03:16 - - [10/Feb/2020:14:03:16 +0000] “GET / HTTP/1.1” 404 14

Two things. First, you say you tried to access myhomeserver.changeip.net. This assumes that you didn’t put /data/media at the end of your URL. Your Caddyfile will only handle requests to that path with the proxy directive you defined.

Secondly, I may be wrong but I don’t think filebrowser supports being served from a subpath. I recommend instead writing your proxy like this:

    proxy / {

If you need to serve other things, I recommend serving them under a different subdomain (multiple subdomains can point to the same IP, and Caddy will handle them based on which domain is in the request)

1 Like

That’s perfect!

I was following some instructions on https://filebrowser.xyz/installation/caddy which indicated that but, indeed I had already set the directory to serve in File Browser itself!

Thank you! :blush:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.