第一步:添加监听端口(Listen 8080) 第二步:建立虚拟主机(基于端口) NameVirtualHost 172.3616.144:8080<VirtualHost 172.36.16.144:8080> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/var/www/html" ServerName 172.36.16.144:8080 ErrorLog logs/dummy-host.example.com-error_log CustomLog logs/dummy-host.example.com-access_log common DirectoryIndex index.html index.htm index.shtml rslogin.php</VirtualHost> 第三步:重启apache服务 service httpd restart