This is my ssh command reference for AWS – linux – ubuntu – apache2
[1] General Commandsmkdir /var/www/website-name
mv = rename folder
Unzip a file
Go to the location cd /var/www/website-name
Then unzip filename.zip
Remove the zip after extractrm filename.zip
[2] Give Permission to be able to connect through fileZillasudo chown -R www-data:www-data /var/www/my-website
sudo usermod -a -G www-data your-sftp-username
sudo chmod -R 775 /var/www/my-website
[3] Create config file to redirect to the website
Make a copy of defaultsudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/website1.conf
Update the conf filesudo nano /etc/apache2/sites-available/website1.conf
ServerName website2.com
ServerAlias www.website2.com
DocumentRoot /var/www/website2
Enable the new sites with a2ensite:sudo a2ensite website1.conf
Reload apachesudo systemctl reload apache2
[4] Install SSLsudo certbot --apache
Set Up Auto-Renewalsudo crontab -l
Check Certificatessudo certbot certificates