PHPBuilder - Apache on WIN32 Page 3



RSS Twitter
Articles Setup And Installation

Apache on WIN32 - Page 3

by: Brian Moon
|
July 30, 2000

Running Apache on NT
If you are on NT you will want to install Apache as a service. To do this select Start, Programs, Apache, Install Apache As Service. Now Apache can be started and stopped using the 'Services' Control Panel Applet. Unless you have a good reason, I would suggest setting this to be started manually. To do this go to Control Panel and select Services. Select the Apache service and click 'Startup'. Set 'Start Up Type' to 'Manual'. This will make you have to start Apache when you need it. The good thing is that it will shut down when NT does. You will not see any Apache windows with this setup.
Running Apache on Windows 9x
If you are using Windows 9x, I would suggest downloading the Apache Manager for Windows from my website (http://brian.threadnet.com/apmgr.html). It stays in the system tray and hides all the console windows that Apache creates. It will allow you to start, stop and restart Apache without worrying about command line mess. If you do not want to use Apache Manager, you can start Apache by selecting Start, Programs, Apache Web Server, Apache Server. This will create a console (MS-DOS) window. DO NOT CLOSE THIS WINDOW. To stop Apache you will need to open an MS-DOS window, switch to your Apache folder ('c:\apache') and type:
apache -k shutdown
It may take a moment for the Apache console window to close. This ensures a proper shutdown of all all the threads and properly closes all the .conf and .log files. Now you know why I wrote Apache Manager.
Testing The System
I do recommend you to run the console version of Apache at least once to be sure all is running well. The only way to get output from Apache is through the console window or the error.log file. The error log can be found under the logs folder in the Apache install folder. In our case 'c:\apache\logs\error.log'.
Ok, start Apache by selecting Start, Programs, Apache Web Server, Apache Server. If all is ok, you will see something like the following in the console window:

Apache/1.3.4 (Win32) running...

If you do not see that and the window disappears quickly you will need to run it from an MS-DOS window. You will need to open an MS-DOS window, switch to your Apache folder ('c:\apache') and type 'apache'. See what error message is given. If it a parse error in the conf file, you will need to correct it by editing httpd.conf and running Apache again.
So, now it is all running. To test your system, open a browser and type: http://localhost/. You should see a page from Apache congratulating you. If you do not, one thing to check is that you have a file in your windows directory called hosts.sam. If it is not there, create it. In that file put:

localhost 127.0.0.1

« Previous Page
1
|
2
|
3
|
4
|
5
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Brian Moon

Comment:



Comment:

(Maximum characters: 1200). You have characters left.