Skip to content

Commit f0b8232

Browse files
hacdiasgitbook-bot
authored andcommittedMay 12, 2019
GitBook: [master] 5 pages modified
1 parent 8d8eba0 commit f0b8232

File tree

4 files changed

+42
-7
lines changed

4 files changed

+42
-7
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Welcome to File Browser's official documentation. Here you can find probably any
88

99
We focus on doing one thing, but doing it well. One of the crucial pieces of File Browser is our community which is always asking us for new features or reporting issues that might happen. We recommend you vividly to check our [GitHub repository](https://github.com/filebrowser/filebrowser).
1010

11-
{% page-ref page="installation.md" %}
11+
{% page-ref page="installation/" %}
1212

1313
{% page-ref page="cli/" %}
1414

‎SUMMARY.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
* [Welcome](README.md)
44
* [Features](features.md)
5-
* [Installation](installation.md)
5+
* [Installation](installation/README.md)
6+
* [Caddy](installation/caddy.md)
67
* [Upgrade from 1.x](upgrade-from-1.x.md)
78
* [Command Line Interface](cli/README.md)
89
* [filebrowser](cli/filebrowser.md)

‎installation.md ‎installation/README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Done! It will bootstrap a database in which all the configurations and users are
3131
You must change the password and, if you can, the username for the best security possible.
3232
{% endhint %}
3333

34-
Although this is the fastest way to bootstrap an instance, we recommend you to take a look at the possibility of options on [`init`](installation.md) and [`config set`](cli/filebrowser-config-set.md) to make the installation as safe and customized as it can be.
34+
Although this is the fastest way to bootstrap an instance, we recommend you to take a look at the possibility of options on [`init`](./) and [`config set`](../cli/filebrowser-config-set.md) to make the installation as safe and customized as it can be.
3535

3636
## Docker
3737

@@ -50,7 +50,3 @@ docker run \
5050

5151
By default, we already have a [configuration file with some defaults](https://github.com/filebrowser/filebrowser/blob/master/.docker.json) so you can just mount the root and the database. Although you can overwrite by mounting a directory to with a new config file.
5252

53-
## Caddy
54-
55-
File Browser was born as a [Caddy](https://caddyserver.com/) plugin. Caddy is a fantastic web server with automatic HTTPS. Although we don't support Caddy as an extension anymore, it's really simple to set up File Browser with the other instructions you can see in this page, and then proxy it via the [`proxy` directive.](https://caddyserver.com/docs/proxy)
56-

‎installation/caddy.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Caddy
2+
3+
We recommend using [Caddy](https://caddyserver.com/) server as a proxy for File Browser. Caddy is a fantastic web server \(such as Nginx or Apache\) but with automatic HTTPS through Let's Encrypt. It's really fast and easy to use.
4+
5+
So, how to use it with File Browser? We just need the [`proxy` directive](https://caddyserver.com/docs/proxy)! We will assume you already have File Browser running on port 8080.
6+
7+
### Run on root domain
8+
9+
```text
10+
example.com
11+
12+
proxy / 127.0.0.1:8080
13+
```
14+
15+
### Run on sub-directory
16+
17+
If you want to run it on a sub-directory, don't forget to set the Base URL option with the intended path. For example, if you want to access File Browser on `/admin`, you should first run:
18+
19+
```bash
20+
filebrowser config set --baseurl /admin
21+
```
22+
23+
And then, use the following Caddyfile:
24+
25+
```text
26+
example.com
27+
28+
proxy /admin 127.0.0.1:8080
29+
```
30+
31+
Same as above, but setting the sub-directory at the top:
32+
33+
```text
34+
localhost:2015/admin
35+
36+
proxy / 127.0.0.1:8080
37+
```
38+

0 commit comments

Comments
 (0)
Failed to load comments.