Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Can't use host:port/path on Caddyfile #21

Open
aigooman opened this issue Jan 20, 2019 · 9 comments
Open

Can't use host:port/path on Caddyfile #21

aigooman opened this issue Jan 20, 2019 · 9 comments
Labels
bug Something isn't working

Comments

@aigooman
Copy link

I use filebrowser as caddy's plugin http.filebrower. My caddyfile is:

my.url {
    filebrowser / /home {
        database /home/www/file/file.db
    }
}

Then I run caddy with no error. But when I enter the url, the index is blank, there is no login web. However, I can still enter https://my.url/files to see my file. Did I do something wrong?

When I enter https://my.url , chrome shows:

image

@hacdias hacdias transferred this issue from filebrowser/filebrowser Jan 20, 2019
@hacdias
Copy link
Member

hacdias commented Jan 20, 2019

@aigooman hey! Sorry to hear that. Just to make sure: the path to the database file you indicate doesn't exist right? If it's from http.filemanager, please delete it.


Just tried the following Caddyfile (similar to yours):

localhost:8080

filebrowser / D:\teste {
  database D:\teste\db.db
}

And had no problem at all.


If deleting the DB doesn't work, please let me know and also take a screenshot at Network tab

@oldiy
Copy link

oldiy commented Jan 20, 2019

caddy

0.0.0.0:80/files {
filebrowser / ./data
}

Can't open index and login

@aigooman
Copy link
Author

It works! Thank you for your help!

@hacdias
Copy link
Member

hacdias commented Jan 20, 2019

That's awesome @aigooman!

@oldiy your issue might be a little different and I think I know why! I'll handle that

@aigooman
Copy link
Author

It seems that you have to indicate the port 80 to run http.filebrowser.
my.url:80 works but my.url doesn't.

@hacdias
Copy link
Member

hacdias commented Jan 20, 2019

@aigooman can't reproduce that issue. If you don't set a port it is supposed to default to 80 as far as I know. Anyways, File Browser doesn't use the port for any port of the code so I don't really know why you are having issues.

@aigooman
Copy link
Author

@hacdias If I use my.url directly, it will use https and it won't redirect to my.url/login?redirect=%2Ffiles%2F to show the login index, but when i set port 80 and set tls to be off,it runs well.

@hacdias
Copy link
Member

hacdias commented Jan 20, 2019

Hmm... I will take a look at both your issues then 😄

@aigooman
Copy link
Author

Thanks~

@hacdias hacdias added the bug Something isn't working label May 11, 2019
@hacdias hacdias changed the title Can't open index and login Can't use host:port/path on Caddyfile May 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants