Custom Search
 


How to install Apache 1.3 web server on Windows



Apache is the most popular web server and it can be installed on Windows to create a web development environment to host local websites coded in PHP and MySQL.

If you are looking for how to install Apache 2, here is How to install Apache 2 web server on Windows.

Pre-requisite: Install PHP on Windows

Here is a list of Apache HTTP server related pages:

  1. Apache HTTP server home page
  2. Apache HTTP server download page
  3. Apache for Windows documentation page

Steps to install Apache on Windows as development machine Step 1: Download Apache 1.3

As of this writing, Apache 1.3.41 is the current stable version of the 1.3 series.

Apache windows binary download links

Step 2: Verify the downloaded file for integrity

Every Apache download comes with a MD5 hash value. This hash value is a Checksum value that can be used to verify data and file integrity. Screenshot below shows the Apache I downloaded was verified by freeware HashCalc.

File downloaded: apache_1.3.41-win32-x86-no_src.msi
MD5 hash provided by Apache.org: 456ef3b2000a713ab0480e1b35679d2c

Checksum calculated:
Verify Apache download by HashCalc

Step 3: Install Apache 1.3

After finishing download, double click the installation file. The installation should start straight away. Here are 9 screenshots. Click the each link to open the screenshot in a different window.

3.1 Welcome

3.2 License Agreement

3.3 Read First

3.4 Server Information

This step needs a bit explanation. Add localhost to both Network Domain and Server Name box. Administrator's Email Address can be anything you like. These info are used for Apache configuration file but you can change them after the installation.

Next, select the first radio button as recommended. This way, Apache will be running as a Windows Service. See Step 7 below for more info about how to start, stop, restart Apache.

3.5 Setup Type

Choose Complete as the setup type.

3.6 Destination Folder

You can leave the default installation folder as is.

3.7 Ready to install

3.8 Installing in progress

3.9 Completed successfully

Step 4: Test your installation

After install, open web browser and type either of the following URLs into your browser's address bar and hit Enter key.

  1. http://localhost
  2. http://127.0.0.1
  3. http://169.254.32.57 or 192.168.0.1 (eg, local network IP address)

http://169.254.32.57 could be your local machine's auto assigned IP that Microsoft has reserved (addresses 169.254.00 to 169.254.255.255).

If you use a router which sets up a LAN (Local Area Network), the router can assign an internal IP. For example, Linksys assumes a default internal IP address of 192.168.0.1

To find out your computer's IP address, open a command line window and run ipconfig command:

  • Click Start
  • Click Run
  • In the Run command box, type cmd and hit OK

    Run command

  • When command line window is opened, type ipconfig and hit Enter key.

    Run ipconfig command

If Apache has been installed correctly, you should see a success message opened in your web browser, as show below.

Apache web server has been successfully installed.

Step 5: Edit the Apache httpd.conf Configuration File

Make sure you change the httpd.conf file according to the screenshots shown in the following section.

Edit Apache configuration file

5.1 Add these two lines in the configuration file.

  1. LoadModule php4_module C:\php\sapi\php4apache.dll (for Apache 1.3 version)

  2. LoadModule php4_module C:\php\sapi\php4apache2.dll (for Apache 2 version)

This will make PHP work as an Apache module.

LoadModule command

5.2 Add AddModule mod_php4.c as shown below.

Add module command

5.3 Comment out DirectoryIndex index.html and add DirectoryIndex index.html index.htm index.php

Directory index

5.4 Add AddType application/x-httpd-php .php

Add type command

5.5 Change your document root directory to a more meaningful one. The directory should be whatever folder your php files are placed into. The screenshot below shows that I

  • Comment out DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"
  • Add DocumentRoot "C:/geeksengine"

So, all my php files are located in a folder named as geeksengine on my C drive.

Set documentroot folder

5.6 Add a directory which should be the folder that contains your php files.

  • Comment out <Directory "C:/Program Files/Apache Group/Apache/htdocs">
  • Add <Directory "C:\geeksengine">

Set documentroot directory

Step 6: Copy core PHP DLL - php4ts.dll

  • Copy from: C:\php\php4ts.dll

  • Paste to either C:\WINNT\system32 (Windows 2000/XP) or C:\Windows\system (Windows 98/Me)

If you forgot to copy, you will see this error when restarting Apache.

Cannot load PHP4dll into Apache server

You will see this Windows MMC error when you restart Apache from Microsoft Management Console (MMC).

MMC error

Step 7: Start, Stop, Restart Apache

Test to see if you are able to start, stop, and restart Apache Server from Windows Start -> Programs -> Apache HTTP Server -> Control Apache Server.

Apache start, stop, restart

If Control Apache Server menu is not available. You can start, stop, and restart Apache by using Microsoft Management Console.

Start -> Settings -> Control Panel -> Administrative Tools -> Services

By using Windows Services, You can Start, Stop, and Restart Apache from Microsoft Management Console. See screenshot below. Selecting Apache as a Windows service will make it automatically start when your computer starts up, and to keep Apache running when you log-off.

Apache start, stop, restart as Windows Services

Step 8: Create a test PHP page

If you have already installed PHP, you can create an index.php page under C:\GeeksEngine folder. I assume you have created this folder in step 5.5 above. Or, you can create index.php in any directory you want as long as this directory has been set in step 5.5 as your DocumentRoot.

Add the following code inside your index.php page and save it:

<?
echo phpinfo();
?>

Step 9: Execute index.php page

Open you web browser and type http://localhost in the address bar. You should see PHP Configuration information page. Apache parses the index.php page and execute PHP function phoinfo() to load the content of php.ini file into your web browser.

PHP Info

If you can see the PHP Configuration page, both PHP and Apache have been installed correctly and you are on your way to create your first PHP website.

How to resolve Port 80 conflict error Port 80 conflict may occur if you have Internet Information Server (IIS) installed on your computer.

Windows 2000/XP comes with Internet Information Server (IIS) as its optional Windows Component. IIS uses port 80. The default setting in Apache httpd.conf also uses port 80.

Because Apache cannot share the same TCP/IP port with another TCP/IP application, you may need to stop or uninstall certain services first. The most common one is Microsoft IIS.

To resolve the conflict, you can change port as either of below:

  • IIS: port 80
    Apache: port 8080

  • Or

  • IIS: port 8080
    Apache: port 80

You can stop IIS either from Internet Services Manager or from command line (Start -> Run -> iisreset /stop)

IIS error:
Port 80 already in use

Or

Service didn't start

The solution is to change either IIS or Apache to port 8080.

IIS properties change:
IIS properties change

Or, Apache configuration change:
Apache configuration change for port 8080


Copyright© GeeksEngine.com



Related Articles:

1.Steps to install PHP 5.x on Windows as a development machine
2.How to install Apache 2.x web server on Windows
3.How to connect two different versions of MySQL server on the same computer
4.How to configure MySQL server 5.1 on Windows
5.How to install MySQL server 5.1 on Windows with screenshots
6.Five ways to create include path for PHP
7.How to use Date and Time data as integer value in PHP and MySQL
8.How to use Apache Virtual Host to run multiple local websites on Windows
9.Install all PEAR packages by yourself
10.How to install PEAR on Windows
11.How to use PHP and Microsoft SMTP Virtual Server to send emails
12.How to install PHP server-side scripting language on Windows
13.How to install two different versions of MySQL server on the same PC
14.How to configure MySQL server 4.1 on Windows
15.How to install MySQL server 4.1 on Windows with screenshots
16.Export Northwind Access database to MySQL via ODBC


Other Recent Articles from the WAMP & LAMP category:

1.How to resolve Apache web server port 80 access problem
2.The free tools I use to build PHP and MySQL websites
3.Steps to install PHP 5.x on Windows as a development machine
4.How to install Apache 2.x web server on Windows
5.How to connect two different versions of MySQL server on the same computer
6.How to configure MySQL server 5.1 on Windows
7.How to install MySQL server 5.1 on Windows with screenshots
8.How to upgrade from PHP4 to PHP5
9.How to load time zone data for MySQL on Windows
10.How to use Apache Virtual Host to run multiple local websites on Windows
11.Install all PEAR packages by yourself
12.How to install PEAR on Windows
13.How to use PHP and Microsoft SMTP Virtual Server to send emails
14.How to install PHP server-side scripting language on Windows
15.How to install two different versions of MySQL server on the same PC
16.How to configure MySQL server 4.1 on Windows
17.How to install MySQL server 4.1 on Windows with screenshots
18.How to set up DSN in ODBC Data Source Administrator on Windows

Copyright © 2017 GeeksEngine.com. All Rights Reserved.

This website is hosted by HostGator.

No portion may be reproduced without my written permission. Software and hardware names mentioned on this site are registered trademarks of their respective companies. Should any right be infringed, it is totally unintentional. Drop me an email and I will promptly and gladly rectify it.

 
Home | Feedback | Terms of Use | Privacy Policy