24 Sep 2024
sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_secure_installation
sudo apt-get install apache2
sudo apt-get install php libapache2-mod-php
sudo systemctl restart apache2
sudo apt-get install phpmyadmin php-mbstring
sudo a2enconf phpmyadmin.conf
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo systemctl restart apache2
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'StrongP@ssw0rd!';
sudo a2disconf phpmyadmin.conf
sudo systemctl restart apache2
sudo chown ubuntu /var/www/html
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d test.domain.com -d www.test.domain.com