After it is installed, Apache runs constantly, listening for and accepting requests. It starts automatically each time you restart the server.
When you stop Apache, all threads that are currently running are allowed to finish. Therefore, it might take a few seconds for Apache to complete its shutdown process and for the status to change to Down.The apache.nlm itself does not shut down, just the worker threads, so Apache restarts very quickly.
You can start and stop Apache using Apache Manager or the NetWare® system console.
The Server Status page includes the capability of starting, restarting, and stopping Apache.
Click
or .If the Apache Web server is already running, the
button reads . Click to have it shut down and then start up again.IMPORTANT:If you run Apache Manager in eDirectory™ mode, as described in Switching between File Mode and eDirectory Mode, you cannot verify whether Apache is running on the Server Status page. To verify whether Apache server is running in eDirectory mode, you must do so from the system console by listing the current screens or from a Web browser by viewing any URL typically displayed by the Web server. If you are able to view your Web content, Apache is running.
To easily restart multiple servers at once, you can use the Server Status page in the Multiple Apache Server interface, as described in Section 6.9, Checking the Status of Each Web Server.
To start Apache at the server console:
Enter the following command:
ap2webup
This loads Apache into the operating system (OS) address space.
or
If you want to load Apache into protected address space, enter the following command:
load address space = apache2 apache2
This command loads the Apache NLM™ program (apache2.nlm) into an address space named apache2.
After Apache starts, it listens on port 80 for requests from client Web browsers, unless you changed the Listen directive in the configuration files, as described in Section 3.8, Managing Listen Ports.
After Apache is started, access the Apache home page:
Open a Web browser either from the NetWare GUI or from a client computer in your network.
Enter the URL of your Apache Web server, which can be either an IP address or a DNS name. For example:
http://myserver.mycompany.com
or
http://172.16.5.18
By default, Apache displays the index.html file in the volume:/apache2/htdocs directory, which is the directory defined by default as the root Web directory. When NetWare is first installed, the index.html file redirects you to the OES Welcome page.
If the index.html file is not found, Apache next tries to display a file named index.html.language_code, where language_code is a two-letter extension. If there is no response from Apache, look in the volume:/apache2/logs/error_log file for details.
Replace the content in the index.html file or language-specific version with your own home page content.
After Apache is running correctly, you can make changes to its default configuration by editing the files in the /apache2/conf directory if you prefer editing text files to using Apache Manager.
To stop Apache at the server console:
To unload Apache running in the OS address space, enter the following command:
ap2webdn
or
If Apache is running in a protected address space, specify the address space in the unload statement. For example:
unload address space = apache2 apache2
apache2 shutdown -p apache2
Using either of these commands unloads the Apache NLM program (apache2.nlm) from an address space named apache2.
To display a list of command line options for the apache2 command, enter apache2 help when Apache is running. When Apache is not running, enter apache2 -h.
You can run multiple instances of Apache concurrently on NetWare by loading each additional instance into its own protected address space.
To do so, each additional instance must have its own address space name. For example:
load address space = apache3 apache2
load address space = apache4 apache2
Using the examples above would create two additional instances of Apache with the unique address space names of apache3 and apache4.
However, each instance of Apache must have its own separate httpd.conf file where unique ports, error and access log filenames can be specified. Using the same configuration file for multiple instances of Apaches causes various errors, including port conflicts. Therefore, the load command must include the full pathname of the httpd.conf file for each instance:
load address space = instance apache2 -f \directory\httpd.conf
where instance represents either apache3 or apache4 from the previous example and directory represents the full path to the httpd.conf file.
To start the Apache Admin server, enter admsrvup at the system console. To stop the Apache Admin server, enter admsrvdn.
The following command line directives can be used at the system console to modify or display information about Apache:
Table 3-1 Display Apache Information
IMPORTANT:At the NetWare console prompt, each directive must be preceded by apache2, as in servername:apache2 directive. Also, Apache must be running. (See Starting and Stopping Apache at the Server Console.)