Apache as the most widely used web server tool, which has a rapid upgrade. Some modules that can run in Apache 1.0 often need to change in Apache 2.0 to operate, such as php3 and php4. It turns out that PHP3 and PHP4 are running in Apache 1.0, just need to make simple modifications in the /etc/httpd/conf/httpd.conf file. However, Apache 2.0 moves these plug-in modules to the /etc/httpd/conf.d file. Here's how to make Apache 2.0 can also run PHP3 and PHP4 by modifying the conf.d file. Implementation Step 1. Users need to download two packages for httpd-2.0.tar.gz and php-4.0.tar.gz, then press the following command to install the Apache2.0's web server:
# TAR ZXVF APACHE2.0.TAR.GZ
# cd httpd-2.0
# ./configure
# Make
# make install
2. Install the PHP4 code. Note that "--with-apxs2 = / usr / local / apache2 / bin / apxs" are not lack in the following command. Its role is to use the PHP to be installed under dynamic modules to the Apache server.
# TAR ZXVF PHP-4.X.TAR.GZ
#CD PHP-4.X
#. / configure --with-apxs2 = / usr / local / apache2 / bin / apxs
--enable-versioning --disable-debug --enable-track-vars
# Make
# make install
3. Set the configuration file httpd.conf for the Apache server. Users "..." in the file "..." "..." changed to the user's IP address, while removing the previous "#". 4. Edit the /etc/httpd/conf.d/php.conf file. Note the two lines displayed in the bottom line in the following code. Its role is to let Apache "know" which are php3 and php4 files and explain this file. After editing, save exit.
# cd /etc/httpd/conf.d/
# vi php.conf
# Php is an HTML-Embedded Scripting Language Which Attempts To Make IT
# easy for developers to write dynamically generated webpages.
#
LoadModule PHP4_Module Modules / Libphp4.so
AddType Application / X-httpd-php .php .php4 .php3 .phtml
AddType Application / X-httpd-php-source .phps
#
# Cause The PHP Interpreter Handle Files with a .php Extension.
#
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
Files>
#
# Add index.php to the list of files That Will Be Served As Directory
# indexes.
#
DirectoryIndex Index.php