diff options
| author | Vincent Douillet <vincent@vdouillet.fr> | 2026-07-10 22:15:00 +0200 |
|---|---|---|
| committer | Vincent Douillet <vincent@vdouillet.fr> | 2026-07-10 22:15:00 +0200 |
| commit | 9669adeceb9cc6ac41ca4ea9b9bc3f89036fc569 (patch) | |
| tree | cfae231b3b4b937fd4e42fa1b5e0f8a95132cec1 /README.md | |
| parent | c5c9cc569178e732ff3fb81d74050c18667bdec4 (diff) | |
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -7,7 +7,7 @@ Vault is an opinionated web-based file manager. It is built in C for OpenBSD aro * __simple__: browse, create and delete folders; download and upload files. JavaScript support is optional on the client side and its absence should be handled gracefully. Everything should work from a terminal-based web browser * __fast__: with the server running on an ARM SBC, there should not be any noticeable delay when loading a page -It should also compile and run on any POSIX OS with minor modifications, although this has not been tested (yet). +It should also compile and run on any POSIX OS with minor modifications. On Linux, `bmake(1)` should be used instead of `make(1)`, and configuration should be adjusted in the `Makefile`. Please note that sandboxing is implemented for OpenBSD _only_. ## Configure @@ -20,11 +20,13 @@ Vault comes with a Makefile: $ make # make install -The vault binary will be installed as `/var/www/cgi-bin/vault`. Static resources will be installed in `/var/www/vault-static` and should be served from `/static`. You need to configure your web server accordingly, see below for a sample file. If the log file does not exist, you need to create it. Here is how to do it for a default installation: +The vault binary will be installed as `/var/www/cgi-bin/vault`. Static resources will be installed in `/var/www/vault-static` and should be served from `/static`. You need to configure your web server accordingly, see below for sample files. If the log file does not exist, you need to create it. Here is how to do it for a chrooted web server, like OpenBSD's `httpd(8)`: # touch /var/www/logs/vault.log # chown www /var/www/logs/vault.log +On other operating systems, assuming a web server that is _not_ chrooted, `config.h` sets the log path to `/var/log/vault.log` instead. + By default on OpenBSD, the `slowcgi(8)` daemon allows a timeout of 2 minutes for CGI programs. This might not be enough if you want to allow users to download large files. This timeout can be increased by changing the `slowcgi(8)` parameters in `/etc/rc.conf.local`, for example to allow up to 10 minutes : slowcgi_flags="-t 600" @@ -48,3 +50,21 @@ By default on OpenBSD, the `slowcgi(8)` daemon allows a timeout of 2 minutes for gzip-static } } + +## Sample lighttpd.conf + + server.modules+=("mod_alias", "mod_cgi", "mod_setenv") + server.port=80 + server.document-root="/var/www/html" + server.errorlog="/var/log/lighttpd/error.log" + server.pid-file="/run/lighttpd.pid" + server.username="www-data" + server.groupname="www-data" + index-file.names=("index.html") + + setenv.set-environment=("VAULT_DATA_DIR" => "/var/www/vault-data") + alias.url = ("/static" => "/var/www/vault-static") + $HTTP["url"] =~ "^/vault(?:/|$)" { + alias.url = ("/vault" => "/var/www/cgi-bin/vault") + cgi.assign = ("" => "") + } |
