Installing and Configuring Apache and PHP 7 on Windows

how to install and integrate Apache and PHP


system requirement
OS windows 10 32/64 bit

Requirement tools
Apache2.4
Php7.1
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 like this

LoadModule php7_module C:/Server/Php7.1/php7apache2_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/Php7.1"

find  
add index.php like this

DirectoryIndex index.php index.html

Add the type handler in section find

 

Add the type handler

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\Php7.1\ext”

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

Leave a comment