重新编译Apache

 

XML/HTML代码
  1. ./configure –prefix=/usr/local/httpd2 –sbindir=/usr/local/httpd2/sbin –enable-so –enable-rewrite=shared –enable-deflate –enable-nonportable-atomics –with-ssl=/usr/lib64/openssl –with-expat=builtin –enable-suexec –with-suexec-caller=www –with-suexec-userdir=public_html –with-suexec-docroot=/www/htdocs –with-suexec-uidmin=103 –with-suexec-gidmin=504  

 

在虚拟主机:

XML/HTML代码
  1. SuexecUserGroup seaprince vhostuser  
  2. ScriptAlias /cgi-bin/ /www/htdocs/public_users/blog.eaxi.com/public_html/cgi-bin/  
  3. <Location "/php-cgi/php">  
  4.         SetHandler fcgid-script  
  5.         Options ExecCGI  
  6.         Allow from all  
  7. </Location>  

家目录:

 

 

XML/HTML代码
  1. mkdir -p ~/public_html/cgi-bin  
  2. cp /usr/local/php5/bin/php-cgi ~/public_html/cgi-bin/php.cgi  
  3. chown seaprince.vhostuser -R /public_html/cgi-bin/  

重启Apache