Update Installation

Ruan 2022-06-24 15:24:03 +00:00
parent 043c7b1d11
commit d48ce2b161

@ -47,37 +47,10 @@ If you want to customize the English messages, you can edit [lang/en_US.utf8.php
## Tutorial
https://youtu.be/_9Q6DBDaHL8
## SSL
Please note: This refers to enabling SSL for the **MySQL database**, not the web interface itself. (HTTPS is already supported as long as your web server provides it)
## Advanced Configuration
To enable SSL for the database, see [Database SSL](https://gitlab.com/ruany/litebans-php/-/wikis/Database-SSL).
[Note:](https://dev.mysql.com/doc/connectors/en/apis-php-pdo-mysql.html) "When running a PHP version before 7.1.16, or PHP 7.2 before 7.2.4, set MySQL 8 Server's default password plugin to
_mysql_native_password_ or else you will see errors similar to _The server requested authentication method unknown to the client [caching_sha2_password]_ even when caching_sha2_password is not used."
To enable SSL, find this section in `inc/database.php`:
```
$options = array(
PDO::ATTR_TIMEOUT => 5,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8",
);
```
Change it to:
```
$options = array(
PDO::ATTR_TIMEOUT => 5,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8",
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false,
PDO::MYSQL_ATTR_SSL_KEY => '/etc/mysql/client-key.pem',
PDO::MYSQL_ATTR_SSL_CERT => '/etc/mysql/client-cert.pem',
PDO::MYSQL_ATTR_SSL_CA => '/etc/mysql/cacert.pem',
);
```
Ensure that all of the paths are correct (client key, client certificate, and CA) as they might differ on your system.
Use the paths for the client key/certificate rather than the server key/certificate as these are two separate things.
To use the web interface in a container environment, see [Docker](https://gitlab.com/ruany/litebans-php/-/wikis/Docker).
## Troubleshooting
If you're using a web host's database, contact them to find out whether their database accepts remote connections. Most [web hosts](https://gitlab.com/ruany/LiteBans/-/wikis/MySQL-Errors#hosts) do not provide this for free plans.