Step 2: Compiling Apache with suEXEC support In practice, this is a promising gain in performance and, more importantly, an architecture that saves memory, as will be discussed in more detail below. To increase the speed, FastCGI provides multiple instances of this daemon, allowing requests to be processed without having to wait. It is a very fast method which for the most part leaves the server untouched and runs the application on a separate daemon.
php suffix is received by the web server, the server calls a wrapper script, starting the FCGI daemon, which from this time on handles the PHP requests.įastCGI is a method for executing dynamic program code from a web server. This is the connection between the web server and the FCGI daemon yet to be configured. The /apache/htdocs directory now needs the additional ExecCGI option. It is assigned using the AddHandler directive. There are three new modules:Īdded to the suEXEC and FCGI modules is the Mime module, which enables us to assign the. I will no longer be discussing the overall configuration, but will instead only be focusing on the differences from Tutorial 2. LoadModule fcgid_module modules/mod_fcgid.soĮrrorLogFormat "[%i\"" combinedįCGIWrapper /apache/bin/php-fcgi-starter/php-fcgi-starter LoadModule suexec_module modules/mod_suexec.so LoadModule authz_core_module modules/mod_authz_core.so LoadModule authn_core_module modules/mod_authn_core.so LoadModule mime_module modules/mod_mime.so LoadModule log_config_module modules/mod_log_config.so LoadModule unixd_module modules/mod_unixd.so LoadModule mpm_event_module modules/mod_mpm_event.so Based on the minimal web server described in Tutorial 2, we’ll configure a very simple application server in the conf/nf_fastcgid file. We’ll configure the web server to start off with, aware of the fact that it is not yet capable of running in this configuration.
Table of Contents What are we doing? Why are we doing this? Requirements Step 1: Configuring Apache Step 2: Compiling Apache with suEXEC support Step 3: Downloading and compiling the FastCGI module Step 4: Installing and preconfiguring PHP Step 5: Creating the CGI user Step 6: Creating a PHP wrapper script Step 7: Creating a PHP test page Step 8: Trying it out Step 9 (Goodie): A little performance test References License / Copying / Further use What are we doing?