有没有人可以解释如何在Windows平台上的Apache服务器(2.x)中作为一个模块运行fastcgi,一步一步。
我已经search了很多网站,并testing了很多东西,但我无法做到这一点。
我想使用Apache服务器与fastcgi运行PHP。
请帮忙。 谢谢。
我已经有最新的fastcgi.dll并添加了http.conf文件LoadModule fastcgi_module“/xampp/apache/modules/mod_fastcgi-2.4.6-AP22.dll”和它的加载,因为Apache可以重新启动。
我应该怎么做下一步?
在Http.conf文件中;
1 – 你需要加载fast_cgi模块LoadModule fcgid_module modules / mod_fcgid.dll
2 – 添加这个:
<IfModule mod_fcgid.c> AddHandler fcgid-script .fcgi .php # Where to look for the php.ini file? FcgidInitialEnv PHPRC "c:/xampp/php" # Set PHP_FCGI_MAX_REQUESTS to greater than or equal to FcgidMaxRequestsPerProcess # to prevent php-cgi process from exiting before all requests completed FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000 # Maximum requests a process should handle before it is terminated FcgidMaxRequestsPerProcess 1000 # Maximum number of PHP processes FcgidMaxProcesses 15 # Number of seconds of idle time before a php-cgi process is terminated FcgidIOTimeout 120 FcgidIdleTimeout 120 #Path to php-cgi FcgidWrapper "c:/xampp/php/php-cgi.exe" .php # Define the MIME-Type for ".php" files AddType application/x-httpd-php .php </IfModule>
3 – 确保你授权你的根目录运行CGI选项索引FollowSymLinks ExecCGI
对于一个很好的信息,你可以访问这里。