apachectl -t 检测错误信息

cgi 模式

参考文章:Run PHP Applications under CGI with Apache on Debian 5
Local 8021 cgi

  1. a2enmod actions
  1. ScriptAlias /local-bin /usr/bin
  2. AddHandler application/x-httpd-php5 php
  3. Action application/x-httpd-php5 /local-bin/php-cgi

fastcgi 模式

  1. a2enmod proxy
  2. a2enmod proxy_fcgi
  1. <FilesMatch "\.php$">
  2. SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost"
  3. </FilesMatch>
  1. <FilesMatch "\.php$">
  2. SetHandler "proxy:fcgi://127.0.0.1:9000"
  3. </FilesMatch>