Apache Configuration For Php

Apache uses httpd.conf file for global settings, together with the .htaccess file for per-directory access settings. Older versions of Apache split upwards up httpd.conf into iii files (access.conf, httpd.conf, together with srm.conf), together with simply about users nonetheless prefer this arrangement. Apache server has a really powerful, but slightly complex, configuration scheme of its own. Learn to a greater extent than most it at the Apache Web site: www.apache.org The next department describes settings inwards httpd.conf that touching on PHP remove together with cannot hold upwards educate elsewhere. If you lot accept criterion installation, together with then httpd.conf volition hold upwards establish at /etc/httpd/conf:
 Older versions of Apache split upwards up httpd Apache Configuration for PHP


Timeout

This value sets the default release of seconds earlier whatever HTTP asking volition fourth dimension out. If you lot educate PHP's max_execution_time to longer than this value, PHP volition proceed grinding away but the user may encounter a 404 error. In prophylactic mode, this value volition hold upwards ignored; you lot must role the timeout value inwards php.ini instead

DocumentRoot

DocumentRoot designates the root directory for all HTTP processes on that server. It looks something similar this on Unix:
DocumentRoot ./usr/local/apache_1.3.6/htdocs.
You tin flaming select whatever directory every bit document root.

AddType 

The PHP MIME type needs to hold upwards educate hither for PHP files to hold upwards parsed. Remember that you lot tin flaming associate whatever file extension amongst PHP similar .php3, .php5 or .htm.
AddType application/x-httpd-php .php
AddType application/x-httpd-phps .phps
AddType application/x-httpd-php3 .php3 .phtml
AddType application/x-httpd-php .html

Action

You must uncomment this trouble for the Windows apxs module version of Apache amongst shared object support:
LoadModule php4_module modules/php4apache.dll
or on Unix flavors:
LoadModule php4_module modules/mod_php.so

AddModule

You must uncomment this trouble for the static module version of Apache.
AddModule mod_php4.c



Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.