Configuration parameters for Apache

Source: Internet
Author: User

#ErrorDocument "The server made a boo boo."
#ErrorDocument 404/missing.html

1.DocumentRoot

DocumentRoot specifying the Apache Server Web page (document) root directory

DocumentRoot "/home/iflow/apache2/htdocs"

2.Director

Directory is used to specify the default path

<directory "/home/iflow/apache2/htdocs" >

AllowOverride All
Require all granted
</Directory>

3.DirectoryIndex

DirectoryIndex is the file name that is displayed by default only if the directory is specified

DirectoryIndex home.html index.html Index.html.var index.shtml

4.DefaultLanguage

DefaultLanguage force specifies the default output of a page for speech speech

DefaultLanguage ZH-CN

5.ServerRoot

ServerRoot setting the root directory of the Apache server

ServerRoot "/home/iflow/apache2"

6.ServerAdmin

serveradmin Setting the email address of the Apache server administrator

ServerAdmin [email protected]

7.ServerName

ServerName Setting the host name of the Apache server

ServerName english.zbxsoft.com

8.Listen

Listen setting the Apache server listening port

Listen 80

9.ErrorLog

Errorlog setting the path and file name of the error log in the Apache server

Errorlog Logs/error_log

10.CustomLog

Customlog

Customlog Logs/access_log Common

11.Timeout

Timeout defines the time-out interval for client programs and server connections, and the server disconnects from the client after this interval (seconds)

Timeout 300

12.KeepAlive

KeepAlive in HTTP 1.0, a single connection can only be transmitted once for an HTTP request, while the KeepAlive parameter is used to support the HTTP 1.1 version of a connection, multiple transfers, so that multiple HTTP requests can be delivered in a single connection

KeepAlive on

13.MaxKeepAliveRequests

Maxkeepaliverequests the maximum number of requests for HTTP requests that can be made for a single connection. Setting its value to 0 will support unlimited transfer requests within a single connection. In fact, there is no client program that requests too many pages in a single connection and usually does not reach this limit to complete the connection.

Maxkeepaliverequests 100

14.KeepAliveTimeout

KeepAliveTimeout tests the time between multiple request transfers in a connection, if the server has completed a request, but has not received the next request from the client, the server disconnects after the interval exceeds the value set by this parameter

KeepAliveTimeout 15

15.IndexIgnore

Indexignore let the server ignore the corresponding file when listing the file list, where the file name is defined using mode configuration

Indexignore.?? * *~ *# header* readme* RCS CVS *,v *,t

16.AddEncoding

The addencoding is used to tell some MIME types that use compression, which allows the browser to unzip the operation

AddEncoding x-compress. Z
AddEncoding x-gzip. gz. tgz

17.AddType

The AddType parameter can specify a MIME type for a specific suffix file, where the settings override the settings in Mime.types

AddType application/x-compress. Z
AddType text/html. shtml
AddType application/x-httpd-php. php. phtml

18.ErrorDocument

The errordocument is used to set the content that should respond to the customer's browser when an error occurs.

ErrorDocument "The server made a boo boo."
ErrorDocument 404/missing.html

Configuration parameters for Apache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.