This article is a succession of step by step that shows you how to install Apache on Windows.
This article was done with the following application version but the principe stays and should work with all version
- Windows 10
- Apache 2.4
Download the binary
The Apache project does not provide the Windows binary.
Download the last binary at apachelounge
- VC15 stands for Visual Studio Compiler Version 15
- VS16 for Visual Studio 16
Unzip and move
- Unzip it (The file readme_first.html is the installation guide and is summarized below)
- Copy the file to
Add the php home directory path into the user and system path
On windows, from 7.4, the sqlite extension needs to get access to the libsqlite3.dll that is located into the php directory.
Create the service
- Start the command prompt as admin
- Install the service and start it with the httpd binary
httpd -k install
httpd -k start
- The http windows service should have been created
- A welcome page should also be seen at http://localhost. This page is located at: C:\Apache24\htdocs
There is more options. See the documentation
To get access to the main server:
The rewrite module permits to have nice url and is generally used.
Uncomment the line
LoadModule rewrite_module modules/mod_rewrite.so
Add virtual host
# Virtual Host
LoadModule php7_module "C:/php-7.2.28-Win32-VC15-x64/php7apache2_4.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
<Directory "C:/php-7.2.28-Win32-VC15-x64/" >
Require all granted
PHP Startup: Unable to load dynamic library 'intl'
If you get this error in the log:
- verify that you see the extension with php
Module not loading
For whatever reason, Apache locates the extension directory from the working directory. In the php.ini, be sure to put the qualified path.
extension_dir = "c:\php-7.2.28-Win32-VC15-x64\ext"
Sqlite module not loading
Be sure to add your php home directory into the user/system path that runs Apache. See bug 78957