Failed to stop apache2.service: Unit apache2.service not loaded. code example
Example: Failed to restart apache2.service: Unit not found.
You are using different service of apache.
run this if you are using the same service.
systemctl restart httpd
<----------------- Or ------------------>
apachectl restart