Page 56 - Open Soource Technologies 304.indd
P. 56

Unit 4: Apache Server Installation in Window



            Complete the steps below before you attempt to start Apache as a Windows “service”!   Notes
            To run Apache from a console window, select the “Start Apache as console app” option from the
            Start menu (in Apache 1.3.4 and earlier, this option was called “Apache Server”). This will open
            a console window and start Apache running inside it. The window will remain active until you
            stop Apache. To stop Apache running, either press select the “Shutdown Apache console app”
            icon option from the Start menu (this is not available in Apache 1.3.4 or earlierIn Apache 1.3.13 and
            above it is now quite safe to press Ctrl+C or Ctrl+Break to stop the Apache in the console window.

            Testing Apache for Windows
            If you have trouble starting Apache please use the following steps to isolate the problem. This
            applies if you started Apache using the “Start Apache as a console app” shortcut from the Start
            menu and the Apache console window closes immediately (or unexpectedly) or if you have
            trouble starting Apache as a service.
            Run the “Command Prompt” from the Start Menu - Programs list. Change to the folder to which
            you installed Apache, type the command apache, and read the error message. Then review the
            error.log file for configuration mistakes. If you accepted the defaults when you installed Apache,
            the commands would be:

            c:
            cd “\program files\apache group\apache”

            apache
            Wait for Apache to exit, or press Ctrl+C

            more <logs\error.log
            After looking at the error.log you will probably have a good chance of working out what went
            wrong and be able to fix the problem and try again. If you are unable to work it out then please
            follow  the  guidelines  for  assistance  at  the  top  of  this  document  or  in  the  FAQ.  Many  users
            discover that the nature of the httpd.conf file is easier to manage and audit than page after page
            of configuration dialog boxes.
            After starting Apache running (either in a console window or as a service) it will be listening
            to port 80 (unless you changed the Port, Listen or BindAddress directives in the configuration
            files). To connect to the server and access the default page, launch a browser and enter this URL:
            http://localhost/
            This should respond with a welcome page, and a link to the Apache manual. If nothing happens
            or you get an error, look in the error.log file in the logs directory. If your host isn’t connected
            to the net, you may have to use this URL:
            http://127.0.0.1/

            Once your basic installation is working, you should configure it properly by editing the files
            in the conf directory.

            Because  Apache  CANNOT  share  the  same  port  with  another  TCP/IP  application,  you  may
            need to stop or uninstall certain services first. These include (but are not limited to) other web
            servers, and firewall products such as BlackIce. If you can only start Apache with these services
            disabled, reconfigure either Apache or the other product so that they do not listen on the same


                                             LOVELY PROFESSIONAL UNIVERSITY                                    51
   51   52   53   54   55   56   57   58   59   60   61