Files
bikinibottom/On host/Baïkal.md
2025-04-24 15:55:10 +02:00

200 lines
6.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Baïkal
## Structure
```
.
├── apache
| ├── baikal (83)
| └── webdav
└── mariadb
```
[https://sabre.io/baikal/install/](https://sabre.io/baikal/install/ "https://sabre.io/baikal/install/")
## mariadb
`mysql -u root -p (transatlantique)`
```
CREATE DATABASE baikal;
CREATE USER "admin"@"localhost" IDENTIFIED BY "BymQt5Z9yaL5hE";
GRANT ALL PRIVILEGES ON baikal.* TO "admin"@"localhost";
FLUSH PRIVILEGES;
EXIT;
```
<div class="table-wrapper" id="bkmrk-database-user-passwo"><table><tbody><tr><th colspan="1" rowspan="1">database</th><th colspan="1" rowspan="1">user</th><th colspan="1" rowspan="1">password</th><th colspan="1" rowspan="1">host</th></tr><tr><td colspan="1" rowspan="1">baikal</td><td colspan="1" rowspan="1">admin</td><td colspan="1" rowspan="1">BymQt5Z9yaL5hE</td><td colspan="1" rowspan="1">localhost</td></tr></tbody></table>
</div>## Installation
```
cd /var/www/baikal/
wget https://github.com/sabre-io/Baikal/releases/download/0.9.4/baikal-0.9.4.zip
unzip baikal-0.9.4.zip
cd baikal
chown -R www-data:www-data Specific config
```
## apache
> add virtualhost to /etc/apache2/sites-available/delmar.bzh.conf
```conf
DavLockDB /usr/local/apache/var/DavLock
<VirtualHost *:83>
       ServerAdmin admin@delmar.bzh
       DocumentRoot /var/www/baikal/html
       ServerName dav.delmar.bzh
       RewriteEngine on
       RewriteRule /.well-known/carddav /dav.php [R=308,L]
       RewriteRule /.well-known/caldav  /dav.php [R=308,L]
       <Directory "/var/www/baikal/html">
               Options None
               # If you install cloning git repository, you may need the following
               # Options +FollowSymlinks
               AllowOverride None
               # Configuration for apache-2.4:
               Require all granted
               # Configuration for apache-2.2:
               # Order allow,deny
               # Allow from all
       </Directory>
       <IfModule mod_expires.c>
               ExpiresActive Off
       </IfModule>
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```
#### Run installer :
> [https://dav.delmar.bzh](https://dav.delmar.bzh "https://dav.delmar.bzh")
## WebDAV
```
sudo a2enmod dav
sudo a2enmod dav_fs
sudo systemctl restart apache2.service
sudo mkdir /var/www/webdav
sudo chown www-data:www-data /var/www/webdav
sudo mkdir -p /usr/local/apache/var/
sudo chown www-data:www-data /usr/local/apache/var
sudo touch /usr/local/apache/var/users.password
sudo chown www-data:www-data /usr/local/apache/var/users.password
```
#### Users
```bash
sudo htpasswd /usr/local/apache/var/users.password julien SnEnfQVzqs8K9A
```
`sudo vim /etc/apache2/sites-available/delmar.bzh.conf`
```
<VirtualHost *:83>
       ServerAdmin admin@delmar.bzh
       DocumentRoot /var/www/baikal/html
       ServerName dav.delmar.bzh
       RewriteEngine on
       RewriteRule /.well-known/carddav /dav.php [R=308,L]
       RewriteRule /.well-known/caldav  /dav.php [R=308,L]
       <Directory "/var/www/baikal/html">
               Options None
               # If you install cloning git repository, you may need the following
               # Options +FollowSymlinks
               AllowOverride None
               # Configuration for apache-2.4:
               Require all granted
               # Configuration for apache-2.2:
               # Order allow,deny
               # Allow from all
       </Directory>
       Alias /webdav /var/www/webdav
       <Directory /var/www/webdav>
               DAV On
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /usr/local/apache/var/users.password
               Require user admin
       </Directory>
       <Directory /var/www/webdav/shared>
               Options Indexes
               AllowOverride none
               Order allow,deny
               allow from all
               DAV On
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /usr/local/apache/var/users.password
               <Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                       Require valid-user
               </Limit>
       </Directory>
       <Directory /var/www/webdav/julien>
               Options Indexes
               AllowOverride none
               Order allow,deny
               allow from all
               DAV on
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /usr/local/apache/var/users.password
               <Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                       Require user julien
               </Limit>
       </Directory>
       <Directory /var/www/webdav/eliot>
               Options Indexes
               AllowOverride none
               Order allow,deny
               allow from all
               DAV on
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /usr/local/apache/var/users.password
               <Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                       Require user eliot
               </Limit>
       </Directory>
       <IfModule mod_expires.c>
               ExpiresActive Off
       </IfModule>
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```
```
sudo a2enmod auth_digest
sudo systemctl restart apache2.service
sudo vim /var/www/webdav/webdav-testfile.txt
sudo chown www-data:www-data /var/www/webdav/webdav-testfile.txt
```