Apache Server Frequently Asked Questions

$Revision: 1.7 $ ($Date: 2000/04/18 20:54:03 $)

The latest version of this FAQ is always available from the main Apache web site, at <http://www.apache.org/docs/misc/FAQ.html>.

If you are reading a text-only version of this FAQ, you may find numbers enclosed in brackets (such as "[12]"). These refer to the list of reference URLs to be found at the end of the document. These references do not appear, and are not needed, for the hypertext version.

The Questions

  1. Features
    1. Does or will Apache act as a Proxy server?
    2. What are "multiviews"?
    3. Why can't I publish to my Apache server using PUT on Netscape Gold and other programs?
    4. Why doesn't Apache include SSL?
    5. How can I attach a footer to my documents without using SSI?
    6. Does Apache include a search engine?
    7. How can I rotate my log files?
    8. How do I keep certain requests from appearing in my logs?

The Answers

I. Features

  1. Does or will Apache act as a Proxy server?

    Apache version 1.1 and above comes with a proxy module. If compiled in, this will make Apache act as a caching-proxy server.


  2. What are "multiviews"?

    "Multiviews" is the general name given to the Apache server's ability to provide language-specific document variants in response to a request. This is documented quite thoroughly in the content negotiation description page. In addition, Apache Week carried an article on this subject entitled "Content Negotiation Explained".


  3. Why can't I publish to my Apache server using PUT on Netscape Gold and other programs?

    Because you need to install and configure a script to handle the uploaded files. This script is often called a "PUT" handler. There are several available, but they may have security problems. Using FTP uploads may be easier and more secure, at least for now. For more information, see the Apache Week article Publishing Pages with PUT.


  4. Why doesn't Apache include SSL?

    SSL (Secure Socket Layer) data transport requires encryption, and many governments have restrictions upon the import, export, and use of encryption technology. If Apache included SSL in the base package, its distribution would involve all sorts of legal and bureaucratic issues, and it would no longer be freely available. Also, some of the technology required to talk to current clients using SSL is patented by RSA Data Security, who restricts its use without a license.

    Some SSL implementations of Apache are available, however; see the "related projects" page at the main Apache web site.

    You can find out more about this topic in the Apache Week article about Apache and Secure Transactions.


  5. How can I attach a footer to my documents without using SSI?

    You can make arbitrary changes to static documents by configuring an Action which launches a CGI script. The CGI is then responsible for setting a content-type and delivering the requested document (the location of which is passed in the PATH_TRANSLATED environment variable), along with whatever footer is needed.

    Busy sites may not want to run a CGI script on every request, and should consider using an Apache module to add the footer. There are several third party modules available through the Apache Module Registry which will add footers to documents. These include mod_trailer, PHP (php3_auto_append_file), mod_layout, and mod_perl (Apache::Sandwich).


  6. Does Apache include a search engine?

    Apache does not include a search engine, but there are many good commercial and free search engines which can be used easily with Apache. Some of them are listed on the Web Site Search Tools page. Open source search engines that are often used with Apache include ht://Dig and SWISH-E.


  7. How can I rotate my log files?

    The simple answer: by piping the transfer log into an appropriate log file rotation utility.

    The longer answer: In the src/support/ directory, you will find a utility called rotatelogs which can be used like this:

       TransferLog "|/path/to/rotatelogs /path/to/logs/access_log 86400"
      
    to enable daily rotation of the log files.
    A more sophisticated solution of a logfile rotation utility is available under the name cronolog from Andrew Ford's site at http://www.ford-mason.co.uk/resources/cronolog/. It can automatically create logfile subdirectories based on time and date, and can have a constant symlink point to the rotating logfiles. (As of version 1.6.1, cronolog is available under the Apache License). Use it like this:
       CustomLog "|/path/to/cronolog --symlink=/usr/local/apache/logs/access_log /usr/local/apache/logs/%Y/%m/access_log" combined
      


  8. How do I keep certain requests from appearing in my logs?

    The maximum flexibility for removing unwanted information from log files is obtained by post-processing the logs, or using piped-logs to feed the logs through a program which does whatever you want. However, Apache does offer the ability to prevent requests from ever appearing in the log files. You can do this by using the SetEnvIf directive to set an environment variable for certain requests and then using the conditional CustomLog syntax to prevent logging when the environment variable is set.