Httpd.conf
Encyclopedia
httpd.conf is a configuration file
Configuration file
In computing, configuration files, or config files configure the initial settings for some computer programs. They are used for user applications, server processes and operating system settings. The files are often written in ASCII and line-oriented, with lines terminated by a newline or carriage...

 which is used by the Apache HTTP Server
Apache HTTP Server
The Apache HTTP Server, commonly referred to as Apache , is web server software notable for playing a key role in the initial growth of the World Wide Web. In 2009 it became the first web server software to surpass the 100 million website milestone...

. It stores information on various functions of the server, which can be edited by removing or adding a number sign
Number sign
Number sign is a name for the symbol #, which is used for a variety of purposes including, in some countries, the designation of a number...

 "#" at the beginning of the line, thus setting values for each directive.

The httpd.conf file can be located on any UNIX-based
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 system that complies with the Filesystem Hierarchy Standard
Filesystem Hierarchy Standard
The Filesystem Hierarchy Standard defines the main directories and their contents in Linux operating systems. For the most part, it is a formalization and extension of the traditional BSD filesystem hierarchy....

 under the following path: /etc/httpd/httpd.conf.

This file, httpd.conf was once used in Microsoft's Internet Information Services

There is a module, invented and originally written in April 1996, called mod rewrite
Rewrite engine
A rewrite engine is software that modifies a web URL's appearance . Rewritten URLs are used to provide shorter and more relevant-looking links to web pages...

 that is designed to provide a rule-based rewriting engine
Rewrite engine
A rewrite engine is software that modifies a web URL's appearance . Rewritten URLs are used to provide shorter and more relevant-looking links to web pages...

, based on a regular expression
Regular expression
In computing, a regular expression provides a concise and flexible means for "matching" strings of text, such as particular characters, words, or patterns of characters. Abbreviations for "regular expression" include "regex" and "regexp"...

 parser, to rewrite requested URLs on the fly. This module operates on the full URLs (including the path-info part) both in per-server context (httpd.conf) and per-directory context (.htaccess
.htaccess
A .htaccess file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration....

) and can generate query string
Query string
In World Wide Web, a query string is the part of a Uniform Resource Locator that contains data to be passed to web applications such as CGI programs....

 parts on result. The rewritten result can lead to internal sub-processing, external request redirection or to an internal proxy throughput. It has been described as "voodoo," and Brian Behlendorf of the Apache Group
Apache Software Foundation
The Apache Software Foundation is a non-profit corporation to support Apache software projects, including the Apache HTTP Server. The ASF was formed from the Apache Group and incorporated in Delaware, U.S., in June 1999.The Apache Software Foundation is a decentralized community of developers...

 has said, "The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail
Sendmail
Sendmail is a general purpose internetwork email routing facility that supports many kinds of mail-transfer and -delivery methods, including the Simple Mail Transfer Protocol used for email transport over the Internet....

. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail."

Commands

The RewriteRule, RewriteCond and alias commands can be used to configure URLs. The latter command is simpler and more reliable. However, it may require root access.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK