Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_fastcgi.so running errors |
|
Author |
|
aras
Joined: 07 Dec 2012 Posts: 18 Location: USA
|
Posted: Sun 16 Dec '12 22:54 Post subject: mod_fastcgi.so running errors |
|
|
Hi everyone!
I am trying to run mod_fastcgi.so module on Apache 2.4 (32-bit) but some httpd.conf settings are evidently not correct since I am getting denial error. I have found the settings that I am using after heavy search on the web and made just minor changes to them. Even though, I found quite a lot of info how to configure mod_fastcgi on Linux, there seems to be no well described info about configuration for Windows.
The following are my settings:
Code: |
ServerRoot "/Apache24"
Listen 80
LoadModule fastcgi_module modules/mod_fastcgi.so
ServerName 127.0.0.1
<IfModule mod_fastcgi.c>
<FilesMatch \.php$>
SetHandler php-script
</FilesMatch>
Action php-script /php5.fcgi virtual
Alias /php5.fcgi /Apache24/fastcgi/php5.fcgi
FastCGIExternalServer /Apache24/fastcgi/php5.fcgi -socket /Apache24/run/php5-fpm-www.sock
<Directory "/Apache24/fastcgi">
Order allow,deny
<Files "php5.fcgi">
Order deny,allow
Deny from all
Allow from env=REDIRECT_STATUS
</Files>
</Directory>
</IfModule>
|
Where “Apache24/run” and “Apache24/fastcgi” are empty folders.
1) Error.log shows no problems after starting Apache:
[Sun Dec 16 15:22:08.148917 2012] [mpm_winnt:notice] [pid 4112:tid 280] AH00455: Apache/2.4.3 (Win32) mod_fastcgi/mod_fastcgi-SNAP-0910052141 configured -- resuming normal operations
[Sun Dec 16 15:22:08.148917 2012] [mpm_winnt:notice] [pid 4112:tid 280] AH00456: Server built: Dec 1 2012 09:30:04
[Sun Dec 16 15:22:08.148917 2012] [core:notice] [pid 4112:tid 280] AH00094: Command line: 'httpd -d C:/Apache24'
[Sun Dec 16 15:22:08.158917 2012] [mpm_winnt:notice] [pid 4112:tid 280] AH00418: Parent: Created child process 3312
[Sun Dec 16 15:22:09.028918 2012] [fastcgi:notice] [pid 3312:tid 300] FastCGI: process manager initialized
[Sun Dec 16 15:22:09.028918 2012] [mpm_winnt:notice] [pid 3312:tid 312] AH00354: Child: Starting 64 worker threads.
2) After accessing index.html – page loads just fine:
a) 127.0.0.1 - - [16/Dec/2012:15:24:29 -0500] "GET / HTTP/1.1" 200 46 (access.log);
b) No error.log.
3) After accessing 127.0.0.1/index.php (phpinfo page), I am getting Forbidden note:
“Forbidden You don't have permission to access /php5.fcgi/index.php on this server.”
And the following logs:
a) 127.0.0.1 - - [16/Dec/2012:15:33:59 -0500] "GET /index.php HTTP/1.1" 403 221 (accoss.log);
b) [Sun Dec 16 15:33:59.081428 2012] [authz_core:error] [pid 3312:tid 832] [client 127.0.0.1:1258] AH01630: client denied by server configuration: C:/Apache24/fastcgi/php5.fcgi (error.log).
Any suggestions would be appreciated.
Last edited by aras on Sun 23 Dec '12 23:50; edited 1 time in total |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
aras
Joined: 07 Dec 2012 Posts: 18 Location: USA
|
Posted: Tue 18 Dec '12 4:05 Post subject: |
|
|
Well, I have tried different settings without results. All the time something would go wrong. The only settings that work for me are as follows:
Code: | <IfModule mod_fastcgi.c>
PidFile /Apache/fastcgi/dopp.pid
ErrorLog /Apache/fastcgi/dopp.log
LogLevel warn
Alias /phpbin/ "C:/php/"
FastCgiServer "C:/php/php-cgi.exe" -processes 1
AddType application/x-httpd-fastphp .php .php5
Action application/x-httpd-fastphp "/phpbin/php-cgi.exe"
<Directory "c:/php">
AllowOverride None
Options None
Require all granted
</Directory>
</IfModule> |
However, I am not sure if those settings would be an acceptable solution with respect to security and "well designed coding". I have a feeling that going with the options including script file such as php-script, -socket, etc. would be better approach. Any ideas? |
|
Back to top |
|
|
|
|
|
|