StumbleUpon  Facebook  Reddit  Add to diigo  

Follow - Monx007
Article Time Stamp: 17 August 2009, 18:56:32 GMT+7

Learn to install Apache, MySQL, PHP, phpMyAdmin, Zend Optimizer and MySQL Tools on Windows XP (Install Apache)

First and foremost we need to get Apache installed and operational before we can install anything else, or they will not work correctly. So let’s begin by installing Apache.

Locate the Apache installer we downloaded earlier and double click on it. This will launch the Apache automated installer for us, there are a few options we’ll need to set along the way, so keep up.

The first few screens are Apache’s configuration, configuring windows to install Apache. This will only take a second and then we’ll be ready to begin.

This first screen we’ll see after the configuration will be the front of the installer. Basically this just gives you a little information about what we’re about to install.

Click >> Next

Next we’ll have a license agreement that we must accept to continue the installation of Apache.

Select “I accept the terms in the license agreement” >> Click Next

The next screen we have basically explains what we’re installing and some useful information about the application and where we can locate updates and so on.

Click >> Next

Next we have the server information. This is just basic configurations for the server and doesn’t take any time at all.

Network Domain (e.g. localhost
Server Name (e.g. localhost
Administrator’s Email Address: Your email here

Then we’ll select “Run as a service for all users – Recommended”. This will start Apache as a service and run it automatically when the system reboot. This would be the best solution for users that want something quick and simple, no maintenance needed.

Click >> Next

Next we have the selection of how we’d like to install it. I’d prefer my documents be in another location as I’d like to organize the rest of my server applications in one folder in root. So we’ll select Custom for this project and continue.

Click >> Next

From the next window that appears, select “Apache HTTP Server” and click on the “Change…” button located in the bottom right.

This will bring up a window similar to this one where we’re able to change the location of the installation folder. I prefer all of my server applications to be in “C:\server\Apache2.2” so I can organize all of them in one folder. So we’ll change the default of “C:\Program Files\Apache Software Foundation\Apache2.2\” to “C:\server\Apache2.2\”. Remember to use an ending back slash.

Click >> Ok

This will look like after we have customize the folder

Click >> Next

After that, the application will bring us to ready to install window. Simple click on Install and the installer will begin the installation of Apache using our custom configurations.

When it’s installing, we’ll see a window similar to this and will disappear automatically when finished.

If after the installation, there's a popup window show up (it's a windows firewall warning) that ask whether we want to block or unblock the Apache Port, just choose Unblock option

Once everything is finished, we’ll get a window similar to this. Simply click on Finish and we’re done. Apache is now installed in the location we provided and is configured using the settings we specified during installation.

Now we can test to see if Apache is installed and running correctly. Let’s open our favorite browser and give it a try. Simply type in http://localhost/ as the URL and hit enter.

If you get a page similar to this, then everything went just fine and Apache is now installed and working correctly.

Remember that we setup Apache to run as a service so the there's a time when the server needs to be stop or restarted manually, example when we changes httpd.conf file. This file contains all the configurations for the server.

Now we can edit and add pages to our new server by going to “C:\server\Apache2.2\htdocs”. This will be where all the web pages will be located and should be stored. This can be changed by configuring the location in the httpd.conf file. To change the document root location, just find these syntax and change it to the directory you want it to:

# This should be changed to whatever you set DocumentRoot to.
<Directory "C:/server/Apache2.2/htdocs">

If you want to use another file beside index.html as your default file serve if a directory is requested, find these syntax and change or add it to the file you want it to :

# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
<IfModule dir_module>
DirectoryIndex index.html

If we change the syntax into:

# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
<IfModule dir_module>
DirectoryIndex index.htm index.html

then if there's index.htm and index.html in the same directory, the Apache webserver will call index.htm instead index.html

If you want to use .htaccess file, you'll be better to change the AllowOverride syntax below to All, so, any directives that you placed at .htaccess file can be executed by Apache webserver.

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride All

And if you want to use rewrite module in .htaccess file, you must activated the module by deleting the remark character (#) at this syntax:

LoadModule rewrite_module modules/

Remember to restart if anything is changed within httpd.conf file.

Last but not least, you may want to look at Apache Syntax Error And Solutions for any warnings / errors that you may find.

 << Main Section   Install MySQL >> 


Article Source: Monx Digital Library

Copyrighted@ Monx Digital Library, otherwise stated
Use of our service is protected by our Terms of Use

 Back To Previous Page ...  




AQWorlds Banner