打开Apache的配置文件,/etc/apache2/sites-enabled/000-default.conf
在文件底部添加如下内容php
<VirtualHost *:8080> ServerAdmin webmaster@localhost DocumentRoot /var/www/html/phpmyadmin ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
打开Apache端口配置文件,/etc/apache2/ports.conf
添加须要监听的端口html
Listen 80 Listen 8084
经过访问http://127.0.0.1:8080便可访问新的虚拟站点web