Faruque Ahmed : MCP, MCSA, MCSE, MCTS, MCIT, CCNA, OCA, OCP, GCP
apt install apache2 mysql-server php7.4 libapache2-mod-php7.4 php7.4-json php7.4-curl php7.4-mysql php7.4-xml php7.4-zip php7.4-imap wget unzip -y
systemctl restart apache2
If you want to add HTTPS to webmail, then you can obtain a free TLS/SSL certificate from Let’s Encrypt CA. First Let’s install the certbot client.
sudo apt install certbot
If you use Apache web server, then you also need to install the Certbot Apache plugin.
sudo apt install python3-certbot-apache
Then issue the following command to obtain a free TLS/SSL certificate. Replace the red-colored text with your actual email address and domain name.
sudo certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email you@example.com -d mail.example.com
If you use Nginx web server, then you need to install the Certbot Nginx plugin.
sudo apt install python3-certbot-nginx
Then use the Nginx plugin to obtain and install the certificate by running the following command. Replace red text with your actual email address and domain name.
sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email you@example.com -d mail.example.com
You will see the following text indicating that you have successfully obtained a TLS certificate. Your certificate and chain have been saved at /etc/letsencrypt/live/mail.example.com/ directory.