Tuesday, June 23, 2009

Setting up the Apache server

Part 1 Installing Apache multiple times
The following procedure allows you to install 2 copies of the apache server one accessed at localhost and the other at localhost:8080. Installing multiple copies of the server allows for testing of php with both version 4 and 5.

This configuration is for development purposes only and should not be used for a live server.

Install Apache 1.3.22-win32-x86.exe or above to c:\program files\apache group

Install as a service by default the service name will be apache

Test by visiting
http://localhost/

in your browser

To install a second server copy the apache directory to

Apachephp5

Your Configuration file will be c:\program files\apache group\apachephp5\conf\http.conf

In the apachephp5/conf directory


In the file httpd.conf

#
# Port: The port to which the standalone server listens. Certain firewall
# products must be configured before Apache can listen to a specific port.
# Other running httpd servers will also interfere with this port. Disable
# all firewall, security, and other services if you encounter problems.
# To help diagnose problems use the Windows NT command NETSTAT -a
#
Port 80

Change port to 8080
Run a command prompt using start run and entering
Cmd
Cd c:\program files\apache group\apachephp5
run apache -i -n "Apache8080" -f "c:\program files\apache group\apachephp5\conf\httpd.conf" Start the service with Net start apache8080 In your browser visithttp://localhost:8080/ to check the service is working You now have two webservers running on the same machine.

No comments:

Post a Comment