First, we have to install Apache and PHP, so we can use the following command:
root@Metasploit:~# apt install apache2 php7 libapache2-mod-php7
Next, copy hop.php to the /var/www/html/ folder and start the Apache2 service:
root@Metasploit:~# systemctl start apache2