
Originally published on 2011-01-18; fully revised and updated.
This guide explains how to install Apache HTTP Server on Windows 7 for local development, based on the original post and its Magento-oriented context. You will learn how to pick the correct Apache package, handle Windows UAC prompts during setup, validate that Apache is running, and apply the key PHP configuration change referenced in the original article.
The original narrative referenced Notepad++, Magento prerequisites from this cheat sheet, and a third-party walkthrough at webdevcodex.com. Those links are preserved here for historical traceability.
Legacy context and prerequisites
In the original post, the local stack was being prepared for Magento installation. The cited requirements at that time were:
- Apache 1.3.x or Apache 2
- PHP 5.2.0 and above (Safe mode off)
- MySQL 4.1.20 and above
Important: these version baselines are historical and no longer considered secure for internet-facing use. Treat this as a legacy/local-dev guide only.
Choose the Apache package type before installing
The original post highlights a common mistake: downloading the source package (src) instead of the Windows installer (msi). For most Windows 7 users, MSI is the simplest route.
| Option | Best for | What to expect |
|---|---|---|
| Apache source archive (src) | Custom builds and advanced users | No installer wizard; additional build/setup effort |
| Apache MSI installer | Standard Windows 7 local setup | Guided install and easier service registration |
| Bundled local stack (WAMP/XAMPP style) | Fast all-in-one local environment | Quicker start, but less transparent component-level control |
Installation workflow on Windows 7
flowchart TD
A[Confirm legacy prerequisites] --> B[Download Apache MSI]
B --> C[Run installer as administrator]
C --> D[Approve UAC prompt]
D --> E[Finish Apache setup]
E --> F[Validate service and localhost]
F --> G[Update PHP ini setting]
G --> H[Restart Apache]
H --> I[Test PHP page]
Step-by-step: Apache install and basic validation
1) Download the MSI installer, not src
If your goal is a quick local install, use the Windows installer package. The original post selected Apache 2.2.17 and verified the download with an MD5 source (reference link).
certutil -hashfile C:\path\to\apache-installer.msi MD5Code language: CSS (css)
2) Run installer and wait for UAC
On Windows 7, the installer may appear to pause briefly before the User Account Control prompt appears. Approve UAC to continue.
3) Verify Apache is up
After installation, confirm the service state and port binding, then test http://localhost in a browser.
sc query | findstr /I Apache
netstat -ano | findstr :80
4) Apply the PHP ini change referenced in the original post
The original article specifically called out uncommenting extension_dir in php.ini on Windows:
; Directory in which the loadable extensions (modules) reside.
; extension_dir = "./"
extension_dir = "ext"Code language: JavaScript (javascript)
If you add PHP to the system PATH, a reboot may be needed before all tools pick it up.
setx PATH "%PATH%;C:\php"Code language: JavaScript (javascript)
To test PHP processing, create a simple file under your Apache document root and open it in a browser:
<?php
phpinfo();
?>Code language: HTML, XML (xml)
Troubleshooting quick reference
| Symptom | Likely cause | What to check |
|---|---|---|
| Installer appears frozen | Pending UAC prompt | Look for background UAC dialog and approve it |
| Install does not match tutorial steps | Downloaded source package instead of MSI | Re-download the Windows installer package |
| localhost does not load | Apache service not running or port 80 conflict | Check service status and port listeners |
| PHP extensions fail to load | Incorrect or commented extension_dir | Set extension_dir correctly in php.ini and restart Apache |
Best practices for legacy local setups
- Use this stack only for local learning or migration testing, not public production hosting.
- Keep a backup of
httpd.confandphp.inibefore each change. - Document exact installer filenames and checksums used by your team.
- Validate each layer in order: Apache first, then PHP, then database/application.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals