Installing and Configuring Apache and PHP

how to install and integrate Apache and PHP

system requirement
OS windows 10 64 bit

Requirement tools
Apache2.4
Php5.6
download apache and php for your os version 64 bit or 32 bit
extract with same folder ex: C:\server
after extracted go to apache folder, open folder conf and open file httpd.conf
find Define SRVROOT in file httpd.conf
add root server like

Define SRVROOT "C:/Server"

next, remove  (#) from  mod_rewrite.so
add Loadmodule

LoadModule php5_module C:/Server/Php56/php5apache2_4.dll

next, find DocumentRoot in file httpd.conf

and modifying with your own location html folder, ex:

DocumentRoot "C:/Server/www"

and config for  directory

<Directory "C:/Server/www">

and add ini file for php

PHPiniDir "C:/Server/Php56"

find  
add index.php like this

DirectoryIndex index.php index.html

Add the type handler in

AddType application/x-httpd-php .php

if you need custom html folder path use alias

<Directory "C:/Server/custom/html">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
Alias /custom "C:/Server/custom/html"

if you use extension for php
modifying php.ini in Php folder
add path for extension_dir = “C:\Server\Php56\ext”

Advertisements
This entry was posted in Apache, PHP and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s