Configure Apache and php

#Config httpd.conf
ServerRoot "D:/webserver/apache"
Listen 81 // incase unable to bind to 80
LoadModule rewrite_module modules/ // Uncomment
ServerName localhost:81
DocumentRoot "D:/webserver/www/"
<Directory "D:/webserver/www">
AllowOverride All

DirectoryIndex index.html index.php

#In the end put these config for php
#Configuration of php for apache

LoadModule php7_module "D:/webserver/php/php7apache2_4.dll"
ScriptAlias /php/ "D:/webserver/php/"
AddType application/x-httpd-php .php .php5 .html
Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC "D:/webserver/php"
PHPIniDir "D:/webserver/php/"

//now configure php.ini

rename php.ini-production to php.ini
#inside php.ini

doc_root = "D:/webserver/www"
extension_dir = "D:/webserver/php/ext"
upload_tmp_dir = "D:/webserver/apache/temp/upload"
session.save_path = "D:/webserver/apache/temp/session"

uncomment extension=php_mysqli.dll // for mysql


Popular posts from this blog

Certificate Pinning in Windows 10 UWP app

Remove Diacritics Using C#