Installing Apache Web Serverguide how to install apache web server
Introduction: Installing Apache. The only reason to install Apache 2.2.11 is if you will be running web-server off your home machine, or for site testing purpose.
To start with we will download all of the necessary applications which can be found at the following locations:
Apache: Apache download page
File to download: Win32 Binary including OpenSSL (MSI Installer): apache_2.2.11-win32-x86-openssl-0.9.8i.msi
Now Open notepad and Copy the Below Batch Code, File -> Save As... File Named: Server Layout.bat
echo y | MD %HOMEDRIVE%\webserver
echo y | MD %HOMEDRIVE%\webserver\bin
echo y | MD %HOMEDRIVE%\webserver\bin\apache2.2.11
echo y | MD %HOMEDRIVE%\webserver\logs
echo y | MD %HOMEDRIVE%\webserver\tmp
echo y | MD %HOMEDRIVE%\webserver\apps
echo y | MD %HOMEDRIVE%\webserver\scripts
echo y | MD %HOMEDRIVE%\webserver\wwwroot
echo y | MD %HOMEDRIVE%\webserver\alias
Now Double Click Server Layout.bat
Description: Server Directory, where all server files will be stored.
Description: This is where you Install Apache, PHP, Perl, MySQL.
Description: There is Server Temporary Folder.
Description: All Server / Site Logs will go here.
Description: Misc Applications for the Server e.g,. PHP MyAdmin, SQLite manager.
Description: This is if you want a defualt folder for script can only be ran.
Description: This is Root Directory for sites.
Description: Alias (Short-Cuts) for Each web-site are here.Installing Apache 2.2.11
Go to your desktop to the previously Downloaded file and double click apache_2.2.11-win32-x86-openssl-0.9.8i.msi. This will start installation of Apache web server. Follow the instructions:
01 - Click next
02 - Select I accept terms in the licence agreement and click next.
03 - Click next
04 - In the first two fields type in localhost and in the last one info@localhost.
We will be installing Apache as a service which starts automatically when computer starts therefore we select Port 80. If you are about to use your web server just from time to time then you may choose Port 8080. This way you would need to start Apache manually everytime you are going to use it.
05 - Select Custom and click next.
06 - Because we want our server to be installed in "C:\webserver\bin\apache2.2.11" click Change button to change the path of the installation.
07 - Navigate to "C:\webserver\bin\apache2.2.11" and click OK. On the next screen click next.
08 - Now you are ready to install Apache. Click Install.
09 - Once everything is done click Finish to exit setup.
10 - You should now see a small Apache icon in the system tray.
12 - Now let´s see if Apache is running. Open your browser and if you were installing Apache as a service (Port 80)
then type in URL http://localhost
and press Enter. You should see It works! displayed on page.
If you were installing Apache using Port 8080 then you would need to first start it by going to Start > All Programs > Apache HTTP Server 2.2 > Control Apache Server and click Start. Then in your browers´s URL type http://localhost:8080
. This should open the same page in your browser.
Make sure you allow Apache access on your firewall.Creating Apache 2.2.11 Alias
Go to "C:\webserver\alias" Create File Named your Alias Cap Senitive. e.g. AliasExample.com.conf
The Following Highlighted Should be Changed to Match your site folder, Alias.
Alias /AliasExample.com/ "c:/webserver/wwwroot/Alias Examples/"
<Directory "c:/webserver/wwwroot/Alias Examples/">
#By Adding the SetEnv Varabile to you Can
#Enable Custom Logging by Adding the Following to httpd.conf "" Section:
#CustomLog C:/webserver/logs/AliasExample.com_access.log combined env=AliasExample.com
#Example: SetEnv Domain_Name without Forward Slash's
#If Enable Allows Visiter to Browse Dirctory like "Windows Explorer"
#Set Options to either None or -Indexes or +Indexes
#This Enabled / Disbaled Server Side Includes.
#Set Options to either None or -Includes or +Includes
#This is To Allow .CGI .PL File to Be ran.
#Set Options to either None or -ExecCGI or +ExecCGI
#This is like a "Short-cut" if enabled or Direct Link if Turned off.
#Set Options to either None or -FollowSymLinks
#Turning off multiple Options
#If you want to turn off all Options simply use:
#MultiViews will take a request for foobar, and find matching files.
#For example, I could have an HTML file foobar.html and a PDF file foobar.pdf.
#MultiViews would determine which of the possible choices best matched the
#Accept header in the request, and serve the appropriate file.
#If you only want to turn off some separate each option with a space in your Options directive:
#Options -ExecCGI -FollowSymLinks +Indexes
#Enable / Disbale The Support for .htaccess files
then type in URL http://localhost/AliasExample.com/
and press Enter. You should see your page displayed on web Browser.
Windows .htaccess Fix
Apply the Following Registration Entries will allow you to Double click .htaccess file to Edit.
Now Open notepad and Copy the Below "Registration Entries", File -> Save As... File Named: HTaccess.reg
Windows Registry Editor Version 5.00
Now Double Click HTaccess.reg, Click Yes to "Are you sure you want to add the information in HTaccess.reg to the registry."
Thats all you have completed your installation and you are now ready to start developing your web applications using Apache.Note: if you want to use PHP, Perl and MySQL you would have to install more programs