Jump to content

FastCGI Used as an Apache Module


iwato

Recommended Posts

BACKGROUND: Hooray, hooray! Although I have not yet done it, I have decided to dump MAMP-Pro permanently. This said, I do not want to actually do it until I have something to replace it. Recently I read a portion of a discussion on CGI Binary and CGI as an Apache module. In that discussion there was mention of something called FastCGI. So, I explored a bit and discovered that the Apache server application has a FastCGI module.QUESTION ONE: Would someone like to address the pros and cons of using FastCGI as an Apache module as opposed to an extension of the CGI Binary?QUESTION TWO: Does Apache's FastCGI module work well with MAMP (not MAMP-Pro, mind you)?Roddy

Link to comment
Share on other sites

1. Pros: It's FastCGI, with all inherent pros of that... period.Cons: Somewhat difficult to compile, install and configure, because it's documentation is somewhat sparse. Making PHP run as CGI, while difficult for first timers, is still relatively easy because there's full blown documentation in various forms, and there isn't that for FastCGI. In fact, most times I've seen FastCGI used, it was on nginx servers (on which I'd assume it's easier, because of the otherwise limited capabilities of nginx*).2. I have no idea. I'm willing to assume "yes", because Apache modules are generally tested on Linux environments first, and with OS X being an UNIX variant, it's bound to work on it. Note though that there isn't really much to be demanded from mod_cgi or mod_fcgid to say that they work "well" or not. They either do or don't. They only provide a "gateway" between the web server and the (F)CGI app, so either the gate works or doesn't.* Note: "Limited" as in "not automated". From what I've gathered after skimming over its documentation (haven't actually tried it), it seems you can do anything in a mod_rewrite like fashion and a scripting-like configuration file. The problem is all conviniences in Apache need to be written "manually" rather than just being loaded as a module, turned on, and a few lines added for tweaks.

Link to comment
Share on other sites

It's FastCGI, with all inherent pros of that... period.
This said, and being the novice that I am, security AND simplicity are highly desirous on my part.My intuition tells me that the purpose of creating the FastCGI Apache module is to allow everything to run via Apache. In short, I should leave PHP as an Apache module when running the Apache FastCGI module. Is this correct?Roddy
Link to comment
Share on other sites

PHP as an Apache module != PHP as CGI != PHP as FastCGIPHP as an Apache module binds itself to Apache, in essense allowing "everything to run via Apache".Running it as a (Fast)CGI application keeps it separate. Apache is reduced only to being a bridge between the HTTP request/response cycle and application (that being the PHP interpreter in this case). The Apache module mod_fcgid does nothing more than actually put that bridge up.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...