Debian11-LAMP_Apache2_MySQL8.0_PHP8.1
Debian11-LAMP_Apache2_MySQL8.0_PHP8.1
If you are not going to use SSL you need to enable only the Apache profile.
Now we will enable Apache Full.
sudo uff allow OpenSSH
sudo ufw allow 'Apache Full'
With this command you can view the status of UFW.
sudo ufw status
You will see the output as follows.
Output
Status: active
To Action From
-- ------ ----
Apache Full ALLOW Anywhere
OpenSSH ALLOW Anywhere
Apache Full (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
DocumentRoot /var/www/html/domainname/public
<Directory /var/www/html/domainname/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Enable the new configuration.
sudo a2ensite domainname.conf
Conclusion
Now you have learned how to install LAMP stack on Debian 11 with Let’s
Encrypt.
Thanks for your time. If you face any problem or any feedback, please leave
a comment below.