Step 1:
Check the current version of your apache2 as follows
apache2 -v
![](https://haneefputtur.com/wp-content/uploads/2020/11/vbefore.jpg)
Step 2 :
To get Apache2 updated, add below repository
sudo add-apt-repository ppa:ondrej/apache2
when prompter press ENTER
![](https://haneefputtur.com/wp-content/uploads/2020/11/aptadd.jpg)
Step 3:
Run below command to update and upgrade
sudo apt update
sudo apt install apache2
press Y when prompted
![](https://haneefputtur.com/wp-content/uploads/2020/11/aptupdate.jpg)
Step 4:
Now you can check version of updated apache 2
apache2 -v
![](https://haneefputtur.com/wp-content/uploads/2020/11/vafter.jpg)
Step 5
Restart apache2 to take effect of new version
sudo systemctl restart apache2
Congratulations! you have successfully upgraded Apache version from 2.4.41 to 2.4.46