logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: Need help configuration for Fast CGI with apache 2.2.3
Author
Panda



Joined: 16 Dec 2006
Posts: 16

PostPosted: Sat 16 Dec '06 7:30    Post subject: Need help configuration for Fast CGI with apache 2.2.3 Reply with quote

i am running a server with apache, php and mysql that included in ther package of ApprServ application server

However i read around and came across with mod fast cgi for apche server to help improve performance for my apache sever, i download the mod, added in apache modules folder of apache, and add the following line LoadModule fcgid_module modules/mod_fcgid.so
to httpd.conf file but then i am stucked with the config of directory stuff i dont really know what directory i should put in httpd.conf in order to make the FCGI mod work with my apache server

here is the directory that i installed AppSev application server:

D:\AppServ is application parent directory
D:\AppServ\Apache2.2 is where apache located
D:\AppServ\php5 is where php located
D:\AppServ\www is where my website located

According to above directories in my windows what should i put in httpd.conf file? of course you know i am noob about this stuff, so please help me to sort it out

thanks in advance
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sat 16 Dec '06 12:55    Post subject: Reply with quote

For example to run PHP with fast cgi

Code:

LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>

   IPCCommTimeout 40
   IPCConnectTimeout 10
   MaxProcessCount 8
   OutputBufferSize 64
   ProcessLifeTime 240
   MaxRequestsPerProcess 500
   
   Alias /fcgi/ "D:/AppServ/fcgi/"
   <Directory /server2/fcgi>   
      AddHandler fcgid-script .php
      Options Indexes FollowSymLinks ExecCGI
      FCGIWrapper "D:/AppServ/php5/php-cgi.exe" .php
      AllowOverride all
      Order allow,deny
      Allow from all
      Satisfy any
   </Directory>

</IfModule>
Back to top
Panda



Joined: 16 Dec 2006
Posts: 16

PostPosted: Sat 16 Dec '06 18:35    Post subject: Reply with quote

thanks for the reply james, but i am still confuse though i dont have the fcgi folder withthin my AppServ folder, is this just bluff to get the access from mod_fcgid, or do i need to create the fcgi folder within AppServ folder?

Thanks again
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sat 16 Dec '06 20:16    Post subject: Reply with quote

jepp, the fcgi folder is outside. But I could be also inside. If it is inside you don't need the alias.
Back to top
Panda



Joined: 16 Dec 2006
Posts: 16

PostPosted: Sat 16 Dec '06 21:08    Post subject: Reply with quote

so is this setting as you said it is example OK that i can go for with my httpd.conf add up ?
Code:

LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>

   IPCCommTimeout 40
   IPCConnectTimeout 10
   MaxProcessCount 8
   OutputBufferSize 64
   ProcessLifeTime 240
   MaxRequestsPerProcess 500
   
   Alias /fcgi/ "D:/AppServ/fcgi/"
   <Directory /server2/fcgi>   
      AddHandler fcgid-script .php
      Options Indexes FollowSymLinks ExecCGI
      FCGIWrapper "D:/AppServ/php5/php-cgi.exe" .php
      AllowOverride all
      Order allow,deny
      Allow from all
      Satisfy any
   </Directory>

</IfModule>


or i need to have it set correctly that pointing to the right directory on my server for directory setting ?

can you please correct it for me and regarding it is true permanent set for my server and running php with fast cgi purpose

Thanks alot and veru appreciated for your help
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sat 16 Dec '06 23:35    Post subject: Reply with quote

Put that at the end of your httpd.conf and try.

Only change the line

from

<Directory /server2/fcgi>

to

<Directory D:/AppServ/fcgi>


Create the fcgi folder in D:/AppServer and go Smile
Back to top
Panda



Joined: 16 Dec 2006
Posts: 16

PostPosted: Sun 17 Dec '06 1:33    Post subject: Reply with quote

thank you so much

one more question: do i put anything in fcgi folder or just leave it empty and i still dont get it why leaving it empty but set the directory for it ?

can i just set my web site folder for directory instead, and if i can does it affect my web site performance or just make it worst ?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sun 17 Dec '06 19:25    Post subject: Reply with quote

You have to put the files into the fcgi folder you want to run as fastcgi and call it http://yourIP/fcgi/your.php
Back to top
Panda



Joined: 16 Dec 2006
Posts: 16

PostPosted: Sun 17 Dec '06 19:47    Post subject: Reply with quote

ok, i am far confused than understand the situation here, like i told in the first post, i am running a phpbb forum in this directory D:\AppServ\www

Do i need to move my entire forum to fcgi folder or set directory for

<Directory D:/AppServ/www>
in order to run combination of php and fast cgi, please give me a liitle more explain

Thanks alot james
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sun 17 Dec '06 22:42    Post subject: Reply with quote

Ok, than you only have to comment out the Alias and correct the pathes to your www.
Back to top
Panda



Joined: 16 Dec 2006
Posts: 16

PostPosted: Mon 18 Dec '06 2:57    Post subject: Reply with quote

I got internal error 500 message, and the error log of apache wrote this:

Code:


[Sun Dec 17 16:47:48 2006] [alert] [client 69.237.184.84] D:/AppServ/www/.htaccess: FCGIWrapper not allowed here, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:47:54 2006] [alert] [client 69.237.184.84] D:/AppServ/www/.htaccess: FCGIWrapper not allowed here, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:22 2006] [error] [client 69.237.184.84] D:/AppServ/www/index.php is not executable; ensure interpreted scripts have "#!" first line, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:22 2006] [error] [client 69.237.184.84] (9)Bad file descriptor: mod_fcgid: don't know how to spawn child process: D:/AppServ/www/index.php, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:23 2006] [error] [client 69.237.184.84] D:/AppServ/www/index.php is not executable; ensure interpreted scripts have "#!" first line, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:23 2006] [error] [client 69.237.184.84] (9)Bad file descriptor: mod_fcgid: don't know how to spawn child process: D:/AppServ/www/index.php, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:25 2006] [error] [client 69.237.184.84] D:/AppServ/www/index.php is not executable; ensure interpreted scripts have "#!" first line, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:25 2006] [error] [client 69.237.184.84] (9)Bad file descriptor: mod_fcgid: don't know how to spawn child process: D:/AppServ/www/index.php, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:36 2006] [error] [client 69.237.184.84] D:/AppServ/www/index.php is not executable; ensure interpreted scripts have "#!" first line, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:36 2006] [error] [client 69.237.184.84] (9)Bad file descriptor: mod_fcgid: don't know how to spawn child process: D:/AppServ/www/index.php, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:36 2006] [error] [client 69.237.184.84] D:/AppServ/www/index.php is not executable; ensure interpreted scripts have "#!" first line, referer: http://tinhthienthu.ath.cx/
[Sun Dec 17 16:48:36 2006] [error] [client 69.237.184.84] (9)Bad file descriptor: mod_fcgid: don't know how to spawn child process: D:/AppServ/www/index.php, referer: http://tinhthienthu.ath.cx/


i am trying to use .htaccess instead of running around trying to figure out the directory to add in my httpd.conf, but unfortunately i got the error, i feel bad, still confuse of what you are trying to tell me, may be i will uninstall this mod for a sake

Thanks james for all your help
Back to top
Snecx



Joined: 14 Dec 2006
Posts: 6

PostPosted: Wed 10 Jan '07 13:25    Post subject: Reply with quote

Have you tried the guide from Sitebuddy? http://www.sitebuddy.com/php/php_apache_fast_cgi_install

It is very easy to understand if you follow step by step.

Looks like now you're pretty much confused about where to put the FCGI folder and such.

For my site I set my site root to run all PHP script via FCGI. Smile

Hope that helps.
Back to top


Reply to topic   Topic: Need help configuration for Fast CGI with apache 2.2.3 View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules