1, 修改 /etc/apache2/ports.conf 将Listen 80改为自己需要的端口,如Listen 7777
2,修改/etc/apache2/sites-enabled/000-default.conf 将第一行的<VirtualHost *:80>改为自己需要的端口
<VirtualHost *:7777>
3 重启
service apache2 restart