Step 1 – download the installation package
- Apache is software, so we have to download it, visit the site https://httpd.apache.org/download.cgi
Click on the latest stable release
- You want the binaries, click on it.
- Now go to ‘win32’ and click on it.
- Scroll down to see ‘ApacheHaus’ , open it.
- You should have something like this.
Scroll down to see the version of Apache in two variations 32 bit and 64 bit (x64) (blue boxes).
- Click on download on whichever one you want (red circles).
Step 2 – Installation
- Open up the downloaded file, and then open up the folder with Apache24 on it. Copy all the files under the folder of Apache24
- Make a new folder in any drive and paste the files in a folder named ‘Apache24’.
Just make sure the address is not much complicated. I just put it in C:/Apache24
Step 3 – Test if Apache is working
- Open the Command Prompt as Administrator and change to the bin sub-directory of the extracted directory; i.e.; C:\Apache24\bin. Type httpd.exe and press Enter.
- Now open the browser and type http://localhost followed by pressing the Enter key. You will see the sample web site up and running.
Step 4 – Edit index.html
- Now edit the file C:\Apache24\htdocs\index.html to include contents of your liking. Something as follows:
- Refresh your browser to see the web site updated.
That’s how easy it is to run Apache Web Server on a Windows 10 box.
Step 5 – Install as a Windows service:
When you close the command window, Apache will exit. However, to ensure that Apache is running all the time, it can quickly be installed as a Windows service. Simply open an administrative command prompt again, and in this time enter the following:
httpd.exe -k install
You should then see a message that the Apache2.4 service has been successfully installed.
You can then start the service by typing in cmd (command line):
net start Apache2.4
if you want to stop the service, you can type
net stop Apache2.4
Step 6 – Monitor Apache (optional)
To allow you to monitor the current state of your Apache server, as well as allow you to quickly start/stop/restart the server, Apache comes with a small utility called “Apache Monitor”. Double click ApacheMonitor.exe from the bin folder to run the utility, or place a shortcut to in in your Startup folder so that it automatically runs whenever Windows starts.