IIS redirect site to HTTPS

To force a site to always use HTTPS, add following content to web.config file.

Here is full web.config file for a web site that use WordPress and Force SSL

Windows 2016 IIS not listen on external IP

On a Windows 2016 server, IIS web site is set to bind on all IP address on the server.

But site is only available on (localhost). To check if this is due to firewall, i disabled firewall, the problem still exists after disabling firewall.

To fix the problem, run following commands as user “Administrator”

Now restart IIS

Install Apache and PHP 7 On Windows

Lets start with PHP. Go to


Decide which PHP version you need.

At the time of this post, PHP 7.2 is latest version is available in following 4 version

VC15 x64 Non Thread Safe
VC15 x64 Thread Safe
VC15 x86 Non Thread Safe
VC15 x86 Thread Safe

x64 vs x86

x64 is for 64 bit OS. Most computers these days are 64 bit.

Thread Safe vs Non Thread Safe

Download “Thread Safe” version if you are using PHP as Apache Module or IIS.

Non-Thread Safe version is for running PHP as FCGI process.

Exact and put the content of ZIP file in folder

Download and Install Apache

Download latest Apache version from


Download 32 or 64 bit depending on your Windows install.

Since we are installing PHP compiled with VC15, we need Apache compiled with VC15. So i downloaded following


The site have other version available for VC14 and VC11, this is useful if you are installing older version of PHP that is compiled with older Visual Studio C++.

Edit httpd.conf, add following to end of the file

If you want to install Apache as Service, run

-n “Apache 2.4” is the service name that will be visible in windows service manager.