Deploying Laravel 8 on Apache & Ubuntu 20.04 LTS with extra security (Modsecurity and Fail2ban)
Deploying Laravel 8 on Apache & Ubuntu 20.04 LTS with extra security (Modsecurity and Fail2ban) Deploying PHP applications has always been the same (almost) over the years. But, I have seen people struggle for simpler things that are generally obvious or apparent for people who are familiar with the Ubuntu-PHP ecosystem or for the people who deploy more often. This is a simple article that lists the commands and explains why we need those commands along the way. At a high level, the software components that we will be using in this article are as follows — Ubuntu 20.04 LTS (The base distribution/OS of our server) Apache2 (The web server) Mariadb (The open source fork of MySQL) Few php extensions (that our laravel app needs) Modsecurity (Apache mod to work as a WAF or Web Application Firewall) Fail2ban (Intrusion Prevention Software) Updating Ubuntu 20.04 LTS The first thing that needs to be done is to update the OS. This is to make sure that our software catalogue is up to da...