Server - Contents

Mojolicious-Extras

Revised:23 August 2021

Login3 with Email

Prerequisites: a. Basic Server (Debian 10.3 64bit) with Webmin, FTP, Firewall, iRedmail and Basic Login3 Website full functioning.

Via iRedadmin (eg. https://[IPserver] or myexample.com/iredadmin), create the user's mailbox 'info' in one's own domain (eg. info@myexample.com).

Install the Login3m App

Upload the Login3m App on the remote server (via PuTTy)and unzip it. This app requires the two extra modules - do the following commands:

sammy@imega:$ unzip login3m.zip
sammy@imega:$ chmod -R 774 login3/ // set permissions
sammy@imega:$ cpanm -S Mojolicious::Plugin::Mail
sammy@imega:$ cpanm -S Email::Valid

Using an inline text editor 'nano' or 'vim', change in both lib/LoginApp.pm and the controller: Login.pm, all the email addresses therein ('self' and 'info') to your own info@myexample.com (using your own domain. That done, restart the systemd login2.service and check its status

sammy@imega:$ sudo systemctl restart login3.serviceĀ 
sammy@imega:$ sudo systemctl status login3.serviceĀ  // 'ctl-c' to exit
Note:
1. Initiating the systemd login3.service, it may seek the Perl modules elsewhere from the home directory and thus fail to start. To satisfy the service, go to Webmin->Tools->Perl Modules and install the 'missing' modules which the status failure messages will indicate, likely to be Email::Valid and a few others.
2. The Nginx webserver sometimes throws up a starting error message: "can't find file: /var/run/nginx.pid". To resolve this, enter the command: sudo touch /var/run/nginx.pid and restart Nginx.
3. iRedmail Apps: Access them via https://[IPserver] and not your domain-name.

A successful install will have mail from the 'Contact Us' page sent to your 'info' mail address (eg. info@myexample). Check via iRedmail's Roundcube app (eg. https://[IPserver] or myexample.com/mail).

The same app but with encrypted passwords, download this version: Login4m App.zip and together with passwd-help.zip
Lastly for a better understanding of Mojolicious routes and rendering capabilities, here is an example of more enhanced website: scaffold_oz.zip

Mojolicious Mojo-PartB
Mojo-Deploy Mojo-Extras