Specifications

Restoring the Default Conguration
It is possible to restore a factory setting or default conguration of Apache without
reinstalling Mac OS X Server. The various .default les in the Apache conguration
directories are put there for this purpose and are installed as Read-Only les to
discourage administrators from modifying them.
To restore the default conguration:
1 Open Terminal.
2 Enter the following command:
$ sudo serveradmin settings web:command=writeSettings
web:variant=withDefaults
A ReadMe.txt le that describes the Apache conguration is available in the
/etc/apache2/ folder.
Using the apachectl Script
The default way to start and stop Apache on Mac OS X Server is to the use the
apachectl command with Server Admin.
The apachectl command controls Apache v2.2. Apache v2.2 runs as a 64-bit process
on relevant hardware.
If you want to use the apachectl script to start and stop Web service instead of using
Server Admin, be aware of the following:
When Apache is started using the  apachectl script, the soft process limit is 100, the
default limit. When you use CGI scripts, this limit might not be high enough. In this
case, you can start Web service using Server Admin, which sets the soft process limit
to 2048. Alternatively, you can enter ulimit -u 2048 before using apachectl.
The  apachectl script does not start Apache when the server restarts.
Because of the issues noted above, if you must control Apache from a script, the
recommended approach is to use the serveradmin command-line tool.
To start Apache from a script:
1 Open your script.
2 Enter the following command:
serveradmin start web
This starts Apache and places a ag in /etc/hostcong to start Web service on restart.
3 Save and run your script.
64 Chapter 5 Working with Open Source Applications