sudo vi /etc/apache2/ports.conf
修改監聽端口以及主機端口爲8080apache
NameVirtualHost *:8080 Listen 8080
sudo vi /etc/apache2/sites-available/default
只要修改virtualHost的端口便可:rest
<VirtualHost *:8080>
重啓apache2code
sudo service apache2 stop sudo service apache2 start
或者it
sudo service apache2 restart