Page content

STEPS

Step 1

Download Apache for Windows

Step 2

Download PHP for Windows for Apache

  • Threadsafe is for IIS
  • NTS (non-threadsafe) is for IIS

Step 3

Unzip and put on the C drive root

Step 4

Place Apache on the C drive root Its the Apache24 folder Should be at the following location C:\Apache24

Step 5

Add PHP path to the System Variables Path

Step 6

Add the Apache24

Step 7

Add the Apache monitor to the startup services

Step 8

Modify PHP Config File

Step 9

Modify Apache Config file Edit the httpd.conf file File is at the C:\Apache24\conf\httpd.conf

Look for the “LoadModule” section If .htaccess is used, then uncomment the line LoadModule rewrite_module modules/mod_rewrite.so ??? LoadModule setenvif_module modules/mod_setenfif.so ???

In the httpd.conf add a reference to the PHP directory from the previous step, the PHP module, and add the AddHandler Edit the httpd.conf file as follows…

#// Update the PHP directory path as per your setup.
#PHPIniDir "F:/localserver/PHP-7.3.0"
PHPIniDir "C:\php-apache-73" 
AddHandler application/x-httpd-php .php
#LoadModule php7_module "F:/localserver/PHP-7.3.0/php7apache2_4.dll"
LoadModule php7_module "C:\php-apache-73\php7apache2_4.dll" 

Edit the httpd.conf file and change the root directory for all websites. It should look something like this below. NOTE: This is not needed for all setups and often only changed if the instance of apacthe is only for 1 website at that location. If there is multiple websites or different ports, then the VS-hosts will need to be configured.
This may also need to be changed assuming that Apache is on a one drive and that the data is on a different drive.

<Directory />
	Options Indexes FollowSymLinks ExecCGI 
    AllowOverride all
</Directory>

IF different port or multiple virtual hosts THEN edit the C:\Apache24\conf\extras\httpd-vhosts.conf ADD a line like …

<VirtualHost *:8444>
    DocumentRoot "E:/PHP/web_church-icon-tracker/public_html/"
    ErrorLog "logs/web_church-icon-tracker.log"
    CustomLog "logs/web_church-icon-tracker_access.log" common
</VirtualHost>

Edit the httpd.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

Change the listen ports to what is needed.

Listen 80
Listen 8444

Adjust the DirectoryIndex as well

<IfModule dir_module>
    DirectoryIndex index.php index.pl index.html index.htm index.xhtml 
</IfModule>