apt-get install apache2
默认的网站根目录是"/var/www/html"
主要配置文件在:
/etc/apache2/apache2.conf
/etc/apache2/sites-available/000-default.conf
修改网站根目录
/etc/apache2/apache2.conf <Directory /var/www/>
/etc/apache2/sites-available/000-default.conf "DocumentRoot /var/www/html"
apt-get install mysql-server mysql-client
apt-get install php5 libapache2-mod-php5
apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
测试 /etc/init.d/apache2 restart
ln -s /home/ks /var/www/html
rm -rf /var/www/html/ks
ln -s /home/ks/ /var/www/html/f
在html下建立了F对应ks目录下的链接
更改端口
/etc/apache2/ports.conf
/etc/apache2/sites-enabled/000-default
80改为8081