Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.15 KB

README.md

File metadata and controls

40 lines (25 loc) · 1.15 KB

Unix webdav server

Part of the unix-cloud project.

A fully featured webdav server integrated with unix users and mainly based on Sabre/DAV.

It is also dependant on PHP-FPM which allows to easily have one process per user with the correct ownership.

Setup

Using Apache and LDAP auth for now.

Prepare

  1. Debian dependencies: sudo apt install apache2 php-fpm php-pgsql composer
  2. Build all: make

PosgreSQL database

sudo make setupdb [dbuser=webdav_user] [dbname=webdav] [pguser=postgres]

Apache vhost

  1. copy and edit vhost file: sudo cp apache.conf /etc/apache2/sites-available/vhost.conf
  2. enable ldap modules: sudo a2enmod ldap authnz_ldap
  3. enable vhost: sudo a2ensite vhost.conf
  4. reload apache: sudo systemctl reload apache2

PHP FPM pools

  1. for each user, create a pool based on fpm-pool.conf
  2. reload fpm: sudo systemctl reload php7.4-fpm

Get the list of ids to preset

getent passwd | awk -F: '($3 >= 1000 && $3 < 2000) { printf "\t%d => \047%s\047,\n", $3, $1 }'