PHP Configuration in Apache Server

Hello dear readers! welcome back to another section of my tutorial on PHP. In this tutorial guide, we will be discussing about how to configure PHP in Apache server.

Apache makes use of httpd.conf file for global settings, and the .htaccess file for pre-directory access settings. Older versions of Apache split up the httpd.conf into three different files (access.conf, httpd.conf, and the srm.conf), and some developers still prefers this arrangement.

Apache server has a very powerful, but slightly complex configuration system of its own. Learn more about it from the official Apache website.

This tutorial describe settings in httpd.conf that has a direct impact on PHP and cannot be set elsewhere. If your installation is standard, then httpd.conf is going to be found at /etc/httpd/conf:

Timeout

DocumentRoot

DocumentRoot ./usr/local/apache_1.3.6/htdocs.

You can choose any directory as root document.

AddType

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

LoadModule php4_module modules/php4apache.dll

or on Unix flavors -

LoadModule php4_module modules/mod_php.so

AddModule

AddModule mod_php4.c

Alright guys! This is where we are rounding up for this tutorial post. In my next tutorial post, we are going to be discussing about the PHP.INI file configuration.

Feel feel to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.

Originally published at https://www.webdesigntutorialz.com.

A tutorial blog that provides tutorials on Web Design, Programming, Java Technologies, Mobile App Development, Database, Machine Learning, etc.