Page 54 - Open Soource Technologies 304.indd
P. 54
Unit 4: Apache Server Installation in Window
mv web3.tgz web4.tgz Notes
mv web2.tgz web3.tgz
mv web1.tgz web2.tgz
mv web.tgz web1.tgz
mv web.log web.old
/usr/sbin/apachectl
graceful
sleep 300
tar cvfz web.tgz web.old
This code can be copied into a file called logrotate.sh, and placed inside the folder where your
web log file is stored (or whatever you name your log file, e.g. access_log, etc.). Just be sure
to modify for your log file names and also chmod (change permissions on the file) to 755 so it
becomes an executable.
This works fine for a single busy site. If you have more complex requirements for log rotation,
be sure to see some of the following sites. In addition, many Linux distributions now come with
a log rotation included. For example, Red Hat 9 comes with logrotate.d, a log rotation daemon
which is highly configurable. To find out more, on your Linux system with logrotate.d installed,
type man logrotate.
4.4 Starting Apache for First Time
Before you start Apache, you should verify that the minimal set of information is present in
the Apache configuration file, httpd.conf. The following sections describe the basic information
needed to configure Apache and how to start the server.
Using Apache With Microsoft Windows
This document explains how to install, configure and run Apache 1.3 under Microsoft Windows.
Most of this document assumes that you are installing Windows from a binary distribution. If you
want to compile Apache yourself (possibly to help with development, or to track down bugs).
Warning: Apache on NT has not yet been optimized for performance: Apache still performs
best, and is most reliable on Unix platforms. Over time NT performance has improved, and
great progress is being made in the upcoming version 2.0 of Apache for the Windows platforms.
Folks doing comparative reviews of webserver performance are still asked to compare against
Apache on a Unix platform such as Solaris, FreeBSD or Linux.
• Installing Apache for Windows (binary install)
• Running Apache for Windows
• Testing Apache for Windows
• Configuring Apache for Windows
LOVELY PROFESSIONAL UNIVERSITY 49