Page 236 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 236
Network Operating Systems-I
notes 5. Apache can also load ISAPI (Internet Server Application Programming Interface) extensions
(i.e. internet server applications), such as those used by Microsoft IIS and other Windows
servers. Apache cannot load ISAPI Filters.
6. When running CGI scripts, the technique Apache uses to find the interpreter for the script
is configurable using the ScriptInterpreterSource directive.
7. Since it is often hard to manage files with names like .htaccess in Windows, you may find it
useful to change the name of this per-directory configuration file using the AccessFilename
directive.
8. Some errors during Apache startup are logged into the Windows event log when running
on Windows NT. This mechanism acts as a backup for those situations where Apache
cannot even access the normally used error.log file.
Note You can view the Windows event log by using the Event Viewer application
on Windows NT 4.0, and the Event Viewer MMC snap-in on newer versions of Windows.
running apache as a console application
Running Apache as a service is typically the recommended way to use it, but it is sometimes
easier to work from the command line (on Windows 9x running Apache from the command line
is the recommended way due to the lack of reliable service support.)
To run Apache from the command line as a console application, use the following command:
httpd
Apache will execute, and will stay running until it is stopped by pressing Control-C. You can
also run Apache via the shortcut Start Apache in Console placed to Start Menu → Programs →
Apache HTTP Server 2.0.xx → Control Apache Server during the installation. This will open a
console window and start Apache inside it. If you don’t have Apache installed as a service, the
window will remain visible until you stop Apache by pressing Control-C in the console window
where Apache is running in. The server will exit in a few seconds. However, if you do have
Apache installed as a service, the shortcut starts the service. If the Apache service is running
already, the shortcut doesn’t do anything.
You can tell a running Apache to stop by opening another console window and entering:
httpd -k shutdown
This should be favored over pressing Control-C because this lets Apache end any current
operations and clean up gracefully.You can also tell Apache to restart. This forces it to reread the
configuration file. Any operations in progress are allowed to complete without interruption. To
restart Apache, use:
httpd -k restart
Note for people recognizable with the Unix version of Apache: these commands provide a
Windows equivalent to kill -TERM pid and kill -USR1 pid. The command line option used, -k,
was chosen as a reminder of the kill command used on Unix.
If the Apache console window closes instantly or unexpectedly after startup, open the Command
Prompt from the Start Menu → Programs. Change to the folder to which you installed Apache,
type the command apache, and read the error message. Then change to the logs folder, and
230 LoveLy professionaL university