first step
sudo vi /etc/apache2/ports.conf
Modify the listening port and host port 8080
NameVirtualHost *:8080
Listen 8080
The second step
sudo vi /etc/apache2/sites-available/default
As long as you can modify the port of virtualHost:
<VirtualHost *:8080>
third step
Apache2 restart
sudo service apache2 stop
sudo service apache2 start
or
sudo service apache2 restart