Follow these simple steps to install Apache2 on Windows.
Step 1: Download Apache2
Download Apache2 for Windows from apache website. I Recommend you to use the unofficial Windows binary from Apache Lounge. This version has performance and stability improvements over the official Apache distribution, although I am yet to notice a significant difference. However, it is provided as a manually installable ZIP file from www.apachelounge.com/download/
Step 2: Extract the downloaded files
We will install Apache in C:\Apache2, so extract the ZIP file to the root of the C: drive.
Apache can be installed anywhere on your system, but you will need to change the configuration file paths accordingly…
Step 3: Configure Apache
Apache is configured with the text file \conf\httpd.conf contained in the Apache folder. Open it with your favourite text editor.
Note that all file path settings use a ‘/’ forward-slash rather than the Windows backslash. If you installed Apache anywhere other than C:\Apache2, now is a good time to search and replace all references to “c:/Apache2″.
There are several lines you should change for your production environment:
Line 46, listen to all requests on port 80:
Listen *:80
Line 116, enable mod-rewrite by removing the # (optional, but useful):
LoadModule rewrite_module modules/mod_rewrite.so
Line 172, specify the server domain name:
ServerName localhost:80
Line 224, allow .htaccess overrides:
AllowOverride All
Step 4: change the web page root (optional)
By default, Apache return files found in its htdocs folder. I would recommend using a folder on an another drive or partition to make backups and re-installation easier. For the purposes of this example, we will create a folder called D:\WebPages and change httpd.conf accordingly:
Line 179, set the root:
DocumentRoot “D:/WebPages”
and line 204:
<Directory “D:/WebPages”>
Step 5: test your installation
Your Apache configuration can now be tested. Open a command box (Start > Run > cmd) and enter:
cd \Apache2\bin
httpd -t
Correct any httpd.conf configuration errors and retest until none appear.
Step 6: install Apache as a Windows service
The easiest way to start Apache is to add it as a Windows service. From a command prompt, enter:
cd \Apache2\bin
httpd -k install
Open the Control Panel, Administrative Tools, then Services and double-click Apache2.2. Set the Startup type to “Automatic” to ensure Apache starts every time you boot your PC.
Alternatively, set the Startup type to “Manual” and launch Apache whenever you choose using the command “net start Apache2.2″.
Step 7: test the web server
Create a file named index.html in Apache’s web page root (either htdocs or D:\WebPages) and add a little HTML code:
<html>
<head><title>testing Apache</title></head>
<body><p>Apache is working!</p></body>
</html>
Ensure Apache has started successfully, open a web browser and enter the address http://localhost/. If all goes well, your test page should appear.
In general, most problems will be caused by an incorrect setting in the httpd.conf configuration file. Refer to the Apache documentation if you require further information.
When you are in uncomfortable position and have no money to go out from that point, you will need to take the lowest-rate-loans.com. Just because it will aid you emphatically. I get bank loan every year and feel fine just because of that.
8:42 PM
great post as usual!