Apache Server Frequently Asked Questions

$Revision: 1.99 $ ($Date: 2010/12/10 10:13:45 $)

Please note that this document refers to a version of the product which has been deprecated, and declared "end of life", in favor of the more recent version of the server. Information obtained here is likely to be outdated and inaccurate.

The latest version of this FAQ is available on the HTTP Server Wiki, at <http://httpd.apache.org/docs/1.3/misc/FAQ.html>. This version is no longer maintained, and contains inaccurate and grossly outdated information.

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?
    9. Does Apache include any sort of database integration?
    10. Can I use Active Server Pages (ASP) with Apache?
    11. Does Apache come with Java support?

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.

    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.cronolog.org/. 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.


  9. Does Apache support any sort of database integration?

    No. Apache is a Web (HTTP) server, not an application server. The base package does not include any such functionality. See the PHP project and the mod_perl project for examples of modules that allow you to work with databases from within the Apache environment.


  10. Can I use Active Server Pages (ASP) with Apache?

    The base Apache Web Server package does not include ASP support. However, a number of projects provide ASP or ASP-like functionality for Apache. Some of these are:

    See also the related projects page to find out more.


  11. Does Apache come with Java support?

    The base Apache Web server package does not include support for Java, Java Server Pages, Enterprise Java Beans, or Java servlets. Those features are available as add-ons from the Apache/Java project site, <URL:http://jakarta.apache.org/>.