sudo apt-get install apache2sudo apt-get install php5sudo apt-get install libapache2-mod-php5sudo apt-get install php5-curl #安装curl库用于通信cd /etc/apache2sudo vi ports.conf#增加下面2行(不含#号和空格)# NameVirtualHost *:7000# Listen 7000cd /etc/apache2/sites-enabledsudo vi 000-default#增加下面三行## DocumentRoot /home/lishujun/workspace/php/# sudo service apache2 restart
增加了端口号是7000的虚拟主机