From 5b7ab853d22c05540e199860bd9fc5f675f01801 Mon Sep 17 00:00:00 2001 From: Devops Date: Wed, 20 Dec 2023 14:38:42 -0800 Subject: [PATCH] Actually add the docs. --- doc/admin/en/Redis.mc | 47 ++++++++++++++++++++++++++++++ doc/admin/en/SMTP.mc | 68 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 doc/admin/en/Redis.mc create mode 100644 doc/admin/en/SMTP.mc diff --git a/doc/admin/en/Redis.mc b/doc/admin/en/Redis.mc new file mode 100644 index 000000000..392cde223 --- /dev/null +++ b/doc/admin/en/Redis.mc @@ -0,0 +1,47 @@ +# Streams Redis configuration +Redis can be used for faster session data storage and retrieval. Here is how to set it up. + +** Prerequisites:** +* Redis must be running and available by IP address. You need to know your Redis authentication string before continuing. +* Be able to edit the Streams .htconfig.php file +## Step 1: Edit the .htconfig.php file +Streams is configured using a _.htconfig.php_ file in the root folder of the installation. Navigate to your Streams installation folder and open the .htconfig.php file with your preferred editor. + +Append the following code to the bottom of the file. + +
// Session storage over Redis
+App::$config['system']['session_custom'] = true;
+App::$config['system']['session_save_handler'] = "redis";
+App::$config['system']['session_save_path'] = "tcp://IP ADDRESS:6379?auth=LONG PASSWORD";
Update the default values to reflect the correct Redis information. + +**IP ADDRESS** = The IP address Redis is listening on. +**LONG PASSWORD** = The authentication string used to access Redis. + +## Step 2: Verify that Redis is receiving the sessions. +This assumes that Redis is listening on IP 127.0.0.1. Update to reflect the correct IP of your Redis service. + +`redis-cli -h IP ADDRESS` +The command will look something like this, and your command prompt will change. + +redis-cli -h 127.0.0.1 +127.0.0.1:6379> + +In order to access the session keys, Redis will require password authorization to be submitted beforehand. +Replace "LONG PASSWORD" in the command below with the Redis password. + +`auth LONG PASSWORD` +It will look something like this, with a small "OK" message at the end to confirm. + +127.0.0.1:6379> auth dkdiidlsdifnlsvniefwnciwncl3j92h3vchlcnal3ijcli439d3gflvn: +ok + +Now, you can view the session keys with this command: + +`keys *` +It will show you all the session identifiers currently stored in Redis: + +127.0.0.1:6379> keys * + 1) "PHPREDIS_SESSION:e9310b5ee224b70f8df649f6938c15d9" + 2) "PHPREDIS_SESSION:d2abb4549333b81c9a119dbb639c0357" + 3) "PHPREDIS_SESSION:8cc64f59b80fc95e4ed43078048dcabb" +127.0.0.1:6379> diff --git a/doc/admin/en/SMTP.mc b/doc/admin/en/SMTP.mc new file mode 100644 index 000000000..4396dc52c --- /dev/null +++ b/doc/admin/en/SMTP.mc @@ -0,0 +1,68 @@ +# Streams SMTP configuration + +Enable Streams to use SMTP by installing and configuring the PHPMAILER plugin. + +**Prerequisites:** +* Login to your Streams site as an administrator +* Have command line access to the Streams installation. +* Be able to edit the Streams .htconfig.php file +## Step 1: Update site email settings +Go to the administrative settings in your Streams instance and navigate to site administration. + +You will need to set the 'Reply-to email address for system generated email' and the 'Sender (from) email address for system generated email' to the same email address you intend to use for SMTP email sending. +Note, in many cases this must be the same as the authenticated user email configured below. + +![Streams site settings](/doc/admin/en/images/site-settings.webp "Streams site settings") + +## Step 2: Enable PHPMAILER +Navigate to the Streams root folder on the command line. Then enable the PHPMAILER plugin using this command: + +`./util/addons install phpmailer` +## Step 3: Configure PHPMAILER +The configuration depends on the SMTP service you are using. Here is a basic example: + +
// PHPMailer addon
+App::$config['phpmailer']['mailer'] = 'smtp';
+App::$config['phpmailer']['host'] = 'smtp.example.com';
+App::$config['phpmailer']['port'] = '587';
+App::$config['phpmailer']['smtpauth'] = 1;
+App::$config['phpmailer']['smtpsecure'] = 1;
+App::$config['phpmailer']['username'] = 'example@example.com';
+App::$config['phpmailer']['password'] = 'email password';
+You need to edit the example with the information from your SMTP provider. Once you have the correct information, append the entire block of code to the bottom of the .htconfig.php file. + +**Here are examples for some common hosting platforms.** + +
// K&T Host - www.knthost.com
+App::$config['phpmailer']['mailer'] = 'smtp';
+App::$config['phpmailer']['host'] = 'smtp.knthost.com';
+App::$config['phpmailer']['port'] = '587';
+App::$config['phpmailer']['smtpauth'] = 1;
+App::$config['phpmailer']['smtpsecure'] = 1;
+App::$config['phpmailer']['username'] = 'Full email address';
+App::$config['phpmailer']['password'] = 'Email password';
+
// Dreamhost - www.dreamhost.com
+App::$config['phpmailer']['mailer'] = 'smtp';
+App::$config['phpmailer']['host'] = 'smtp.dreamhost.com';
+App::$config['phpmailer']['port'] = '587';
+App::$config['phpmailer']['smtpauth'] = 1;
+App::$config['phpmailer']['smtpsecure'] = 'tls';
+App::$config['phpmailer']['username'] = 'Full email address';
+App::$config['phpmailer']['password'] = 'Email password';
+
// Namecheap - www.namecheap.com
+App::$config['phpmailer']['mailer'] = 'smtp';
+App::$config['phpmailer']['host'] = 'mail.privateemail.com';
+App::$config['phpmailer']['port'] = '587';
+App::$config['phpmailer']['smtpauth'] = 1;
+App::$config['phpmailer']['smtpsecure'] = 1;
+App::$config['phpmailer']['username'] = 'Full email address';
+App::$config['phpmailer']['password'] = 'Email password';
+
// Netcup - www.netcup.com
+//Note: Host changes depending on server. Check with netcup.net support. 
+App::$config['phpmailer']['mailer'] = 'smtp';
+App::$config['phpmailer']['host'] = 'CHANGEME.netcup.net';
+App::$config['phpmailer']['port'] = '587';
+App::$config['phpmailer']['smtpauth'] = 1;
+App::$config['phpmailer']['smtpsecure'] = 1;
+App::$config['phpmailer']['username'] = 'Full email address';
+App::$config['phpmailer']['password'] = 'Email password';