1.开启Apache
sudo apachectl start
浏览器打开 http://localhost/ 显示 it work 即表示开启成功
2.配置Apache
打开 Apche 的配置文件:/etc/apache2/httpd.conf
找到 Options FollowSymLinks Multiviews
改成 Options FollowSymLinks Multiviews Indexes
开启php的
LoadModule php5_module libexec/apache2/libphp5.so
保存
3.重启Apache
sudo apachectl restart