mirror of
https://github.com/filegator/filegator.git
synced 2025-08-07 03:36:42 +02:00
Website generation with Couscous
This commit is contained in:
@@ -66,7 +66,40 @@
|
||||
|
||||
|
||||
<section id="content" class="col-sm-offset-3 col-lg-offset-2 col-sm-9 col-lg-10">
|
||||
<h3 id="configuration-options">Configuration options:</h3>
|
||||
<h3 id="configuring-filegator">Configuring FileGator</h3>
|
||||
<p>All configuration options are stored inside <code>configuration.php</code> file.
|
||||
In this file you can configure all the options, services and their handlers.</p>
|
||||
<h3 id="configuring-auth-service-to-use-database">Configuring Auth service to use database</h3>
|
||||
<p>You can store your users inside mysql database (default is json file).</p>
|
||||
<p>First, create a table <code>users</code> with this sql:</p>
|
||||
<pre><code>CREATE TABLE `users` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`username` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`role` varchar(20) NOT NULL,
|
||||
`permissions` varchar(200) NOT NULL,
|
||||
`homedir` varchar(2000) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `username` (`username`)
|
||||
) CHARSET=utf8 COLLATE=utf8_bin;</code></pre>
|
||||
<p>Then, import default users with this query:</p>
|
||||
<pre><code>INSERT INTO `users` (`username`, `name`, `role`, `permissions`, `homedir`, `password`)
|
||||
VALUES
|
||||
('guest', 'Guest', 'guest', '', '/', ''),
|
||||
('admin', 'Admin', 'admin', 'read|write|upload|download|batchdownload|zip', '/', '$2y$10$Nu35w4pteLfc7BDCIkDPkecjw8wsH8Y2GMfIewUbXLT7zzW6WOxwq');</code></pre>
|
||||
<p>Ath the end, open <code>configuration.php</code> and update Auth handler under section <code>services</code> to something like this:</p>
|
||||
<pre><code> 'Filegator\Services\Auth\AuthInterface' => [
|
||||
'handler' => '\Filegator\Services\Auth\Adapters\Database',
|
||||
'config' => [
|
||||
'driver' => 'mysqli',
|
||||
'host' => 'localhost',
|
||||
'username' => 'root',
|
||||
'password' => 'password',
|
||||
'database' => 'filegator',
|
||||
],
|
||||
],</code></pre>
|
||||
<h3 id="default-configuration-options">Default Configuration options</h3>
|
||||
<pre><code> 'public_path' => APP_PUBLIC_PATH,
|
||||
'public_dir' => APP_PUBLIC_DIR,
|
||||
|
||||
|
Reference in New Issue
Block a user