Apache
对于Apache,首先是apache的安装,可以参考下面这篇博客:编译安装Apache
Nginx
对于nginx的安装和配置,可以看下面这篇博客:nginx 编译安装以及简单配置
修改nginx.conf中server部分
location ~ .*\.php(.*)$ { #解决无法获取PATH_INFO参数 fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }