Configure Apache PHP

Step 1 - create folder wwwroot


Step 2 - rename php.ini-dist to php.ini


Step 3 - open C:\PHP\php.ini, then make the following changes
  • doc_root = "C:\wwwroot\"
  • extension_dir = "C:\PHP\ext"


Step 4 - open C:\Program Files\Apache Group\Apache2\conf\httpd.conf then make the following changes
  • DocumentRoot = "C:/wwwroot/"
  • DirectoryIndex = "index.php"







Step 5 - add the following lines (search "media types")
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .php5
Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC "C:/php"



Step 6 - restrart Apache 



Step 7 - test your Apache server

0 comments: