Httpd.conf translation of apache2

xiaoxiao2021-03-06  40

#Profil based on the NCSA service.

#

# This is the primary configuration file of the Apache server.

# It contains the configuration instruction of the server's impact server.

# See

# The server will use the absolute path, if the file name is not "/", then it will put serverroot

# 的 value is attached to the front of the file name, for example, for "logs / foo.log", if the value of ServerRoot

# Is "/ usr / local / apache2", the file should be "/usr/local/apache2/logs/foo.log"

#

## 第一 区: Global Environmental Parameters

#

# The parameters set here will affect the behavior of the entire Apache server;

#, For example, the quantity of concurrent requests that can process the Apache.

#

#ServerRoot: Indicates the root directory that the server saves its configuration, error, and log files.

#

#note! If you want to specify it as a location on NFS or other networks,

# Please read the document related to LockFile (maybe

#

#

# Serial access locks must be saved on local disks

#

#Lockfile logs / affept.lock

#SCoreboardFile: The file used to save the internal service process information.

# If it is not specified (default), the scoreboard will be saved in an anonymous shared memory segment.

# And it cannot be used by third party software.

# If you specify, make sure you can't use two apache to use the same bracket file,

# This note panel file must be saved on the local disk.

#

#Scoreboardfile logs / apache_runtime_status

#

#PIDFILE: Record the file of the server startup process number.

#

Pidfile logs / httpd.pid

#

#Timeout: Timeouts before receiving and sending

#

TIMEOUT 300

#

#Keepalive: Whether a solid connection is allowed (there are multiple requests for each connection),

#. Set to "OFF".

#

Keepalive ON

#

#MaxkeepaliveRequests: The maximum number allowed during the stable connection,

# Set to 0 means no restriction access.

# 我们 推荐 You will set it to a larger value in order to improve performance

MaxkeepaliveRequests 100

#

#Keepalivetimeout: The number of seconds received from the same customer on the same connection

#

KeepaliveTimeout 15

##

## Server-pool size setting (for MPM)

##

# Prefork mpm

# StartServers: The number of processes started when the server starts

# MinSpareServers: Minimum number of spare processes

# MaxSpareServers: Maximum number of spare processes

# MaxClients: The maximum number of processes allowed by the server

# MaxRequestSperchild: A maximum number of requests allowed by a service process

StartServers 5

MinSpareServers 5

MaxSpareServers 10

MaxClients 150

MaxRequestperChild 0

# Worker MPM

# StartServers: Number of service processes when the server starts

# MaxClients: Maximum number of users allowed at the same time

# Minsparethreads: Number of minimum working threads

# MaxSparethreads: Number of maximum working threads allowed

# Threadsperchild: Work thread constant in each service process

# MaxRequestsperchild: The maximum number of requests allowed in the service process

STARTSERVERS 2

MaxClients 150

Minsparethreads 25

Maxsparethreads 75

ThreadsperChild 25

MaxRequestSperChild 0

# Perchild MPM

# Numservers: Number of service processes

# StartThreads: The number of starting threads in each service process

# Minsparethreads: Number of minimum threads

# MaxSparethreads: The maximum number of threads guaranteed

#Maxthreadsperchild: Maximum number of threads allowed for each service process

# MaxRequestSperchild: Each service process allows the maximum number of connections

Numservers 5

StartThreads 5

Minsparethreads 5

Maxsparethreads 10

MaxthreadsperChild 20

MaxRequestSperChild 0

# Winnt MPM

# Threadsperchild: Working thread constant in the service process

# MaxRequestSperchild: The maximum number of requests allowed by the service process

ThreadsperChild 250

MaxRequestSperChild 0

#BEOS MPM

# StartThreads: The number of threads that start when the server starts

# MaxClients: The maximum number of threads that can be started (a thread is equal to one user)

# MaxRequestsPERTHREAD: Maximum number of requests allowed by each thread

StartThreads 10

MaxClients 50

MaxRequestsPERTHREAD 10000

# NetWare MPM

# ThreadStachSize: Stack size assigned to each working thread

# StartThreads: The number of threads that start when the server starts

# Minsparethreads: Idle thread used to handle the real request

#Maxsparethreads: The maximum number of idle threads

# Maxthreads: Maximum number of threads at the same time

# MaxRequestperChild: The maximum number of thread service requests,

# Recommend it to 0 to achieve unlimited access

Threadstacksize 65536

StartThreads 250

Minsparethreads 25

Maxsparethreads 250

Maxthreads 1000

MaxRequestperChild 0

# Os / 2 mpm

# StartServers: Quantity of the startup service process

# Minsparethreads: Minimum idle thread per process allowed

#Maxsparethreads: Maximum idle thread per process allowed

# MaxRequestSperchild: Maximum number of connections allowed for each service process

STARTSERVERS 2

Minsparethreads 5

Maxsparethreads 10

MaxRequestSperChild 0

#

# Listen: Allows you to bind the Apache service to the specified IP address and port to replace the default value

# See instruction

# Use the following command to make Apache only listen on the specified IP address,

# To prevent it from listening on IP address 0.0.0.0

#

# Listen 12.34.56.78:80

Listen 80

#

# Dynamic Sharing Support (DSO)

#

# In order to be able to use functions in modules compiled in DSO mode, you must have the corresponding "loadModule" line,

# Therefore, these instructions are included here so that it can be activated before use.

# The static compiler module does not need to be listed here (ie the modules listed in "httpd -l")

#

# 图 例::

# Loadingmodule foo_module modules / mod_foo.so

#

#

# ExtendedStatus: When "Server-Status" is called, the control Apache is a "full" state.

# 信息dededStatus ON, or generates basic information (ExtendedStatus OFF).

# 认 为 OFF

#

# ExtendedStatus ON

### 第 二: "Lord" service configuration

#

# This area establishes a directive value for the "master" server to respond to those who are not

# Define any request for processing.

# These values ​​also provide default values ​​to the container defined later.

# If there is definition in , the directive value defined here will be

The definition of # covered.

#

#

# If you want httpd to run in another user or group, you must start with root when you start # and then switch it to the user or group you want to use.

#

# User / group: Users and groups running httpd

# Use "User Nouser" and "Group NOGROUP" on SCO (ODT3)

# On HPUX, you may not be able to use Shared Memory as Nobody, it is recommended to create a WWW user.

# Note Some cores (KERNEL) reject setgid (group) or SemctL (IPC_set) when group ID is greater than 60000.

# Do not use "Group # -1" on these systems.

#

User Nobody

GROUP # -1

#

# ServerAdmin: Your email address, Apache will send you an email when a problem occurs.

# As an error document, this address is displayed on the server-generated page,

# 例如 例如: admin@your-domain.com

#

ServerAdmin

Kreny@sina.com

#

# ServerName Specifies Apache to identify its own name and port number.

# Usually this value is automatically specified, but we recommend that you explicitly specify it to prevent errors from starting.

#

# If you specify an invalid DNS name for your host, Server-generated redirect will not work.

# See UsecanonicalName Directive

#

# If your host is not registered with a DNS name, type it here IP address

# In any case, you must use its IP address to provide services.

# Here, use an easy understanding manner to redirect services

ServerName

# When set to "ON", Apache will use the value of the ServerName instruction.

#

Usecanonicalname OFF

#

# DocumentRoot: The root directory of your document. By default, all requests answers from this directory.

# However, you can use symbolic links and alias to point to other locations.

#

Documentroot "/ home / redhat / public_html"

#

# Apache Accommodates Each directory can be configured with access rights (including its subdirectory).

#

# First, we configure a highly restricted feature.

# This will prohibit access to the directory where the file system is located and add the directory block you want to access.

# As follows

ORDER DENY, ALOW

Deny from all

#

# Note From here, you must express which special features can be used.

# - So, if Apache doesn't work like you expect,

# Please check if you are clearly specified below.

#

#

# This will change to Documentroot you set

#

#

# Options: This command can be "none", "all", or any combination of the following options:

# Indexes Includes Followsymlinks Symlinksifownermatch Execcgi MultiViews #

# Note that "MultiViews" must be explicitly specified, "Options All" cannot provide you with this feature.

#

# This instruction is both complex and important, please see

# "

Http://httpd.apache.org/docs-2.0/mo ...> Enzyme  嗟 嗟 畔?? lt; / a>

#

Options Followsymlinks

#

# AllowOverride Controls the instructions that are placed in the .htaccess file.

# It can be "all", "none", or a combination of the following instructions:

# Options fileInfo authconfig limited

#

ALLOWOVERRIDE NONE

#

# Control Who can get a service.

#

ORDER ALOW, DENY

ALLOW FROM ALL

#

# Userdir: Specifies the directory name that will be added to the user home directory when you get one ~ user request.

#

Userdir public_html

# To prevent vulnerabilities on the UserDir instruction, set up the root user

# "./" This Userdir is very useful.

# If you use Apache 1.3 or above, we strongly recommend you

# In your server configuration file contains the following line

Userdir disabled root

#

# 下 below is an example of a read-only property using the userdir directory to make a site:

#

#

# Allowoverride fileinfo authconfig limited indexes

# Options MultiViews INDEXES SYMLINKSIFOWNERMATCH INCLUDENOEXEC

#

# Order allow, deny

# Allow from all

#

#

# Order deny, allow

# Deny from all

#

#

#

# DirectoryIndex: Define Request is a directory, Apache provides the user's file name to the user

#

# Index.html.var file (a type image file) is used to provide a list of documents,

# For the same purpose, you can use the multiviews option, but it will be very slow.

#

DirectoryIndex index.php index.html index.html.var

#

# AccessFileName: The file name of the file that provides additional configuration instructions is provided in each directory.

# See Allowoverride Directive.

#

AccessFileName .htaccess

#

# The following rows prevents .htaccess and .htpasswd files are viewed by the web customer.

#

ORDER ALOW, DENY

Deny from all

#

# TypeConfig: Where to query mime.types files in the definition. #

TypeConfig conf / mime.types

#

# DefaultType: Definition When you cannot determine the default MIME type provided by the server when the MIME type is not determined.

# If your service mainly contains text or html document, "Text / Plain" is a good choice;

# If most is a binary document, such as software or images, you should use

# "Application / Octer-Stream" to prevent browser from displaying binary files as text.

#

DefaultType Text / Plain

#

# MOD_MIME_MAGIC Allows the server to use different clues from their own type of file (HINTS),

# This MIMEMAGICFILE directive defines the file where the Hints definition is located.

#

MimeMagicfile conf / magic

#

# Hostnamelookups: Specifies the name of the recorder or an IP address, for example, when this directive is ON

# Record the host name, such as www.apache.org; record IP address when OFF, 204.62.129.132.

# The default value is OFF, this is much better than set to ON, because if it is set to ON, each user request will be

# At least a query for Nameserver.

#

Hostnamelookups off

#

# Enablemap: Controls whether to perform memory dump (if the operating system is supported).

# 认 为 on, if your server is installed on the network file system (NFS), turn it off.

# On some systems, close it will increase system performance (independent of file system type);

# Please refer to

http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile "target =" ... E.Org/docs-2.0/mo...#ENABLESENDFILE

#

# Enablesendfile off

#

# RRLOG: Error log file positioning.

# If you don't define an ErrorLog instruction in , this virtual host's error message

# Will be recorded here. If you define ERRORLOG there, these error messages will be recorded in you.

# In a defined file, not the file defined here.

#

ErrorLog logs / error #

# Loglevel: Controls the number of log information recorded in the error log file.

# Possible values ​​include: Debug, Info, NOTICE, WARN, Error, crit, Alert, Emerg.

#

Loglevel Warn

#

# The following instruction defines the format alias for the Customlog command.

#

Logformat "% H% L% u% T /"% r / "%> s% b /"% {referer} I / "/"% {user-agent} i / "combined

Logformat "% H% L% u% T /"% r / "%> s% B" CommON

Logformat "% {referer} i ->% u" Referer

Logformat "% {User-agent} i" Agent

# You need to install the MOD_LOGIO.C module to use% i and% o.

# Logformat "% H% L% U% T /"% r / "%> s% b /"% {referer} I / "/"% {user-agent} I / "% i% o" combinedio

#

# Specify the positioning and format of the access log file (general log format).

# If you don't define this instruction within , transfer information will be recorded here,

# If you define this instruction, record the location you specified instead of this defined location.

#

Customlog logs / Access_log Common

#

# If you want to record the Agent and Referer information, you can use the following instructions.

#

# Customlog Logs / Referer_log Referer

# Customlog Logs / Agent_log Agent

#

# If you want to use a file to record Access, Agent, and Referer information,

# You can define this command as follows:

#

# Customlog logs / access_log combined

#

# ServerToKens

# This instruction definition is included in the information type in the HTTP response header. Default "full",

# This means that the operating system type and compilation information in the module are included in the response header.

# Can be set to one of the columns:

# Full | OS | Minor | MINIMAL | Major | Prod

# Full conveys the most information, and the Prod is at least.

#

ServerToKens Full

#

# 随意 加加 加 包 包 信息 信息 信息 信息 信息 信息 一 中 中 到 中 到 到 到

# (Internal error document, FTP directory list, mod_status, and mod_info output, etc., in addition to CGI errors

# 或 或 自 错 文 文 文 错

# Set to "email" will contain a MailTo pointing to ServerAdmin: connection.

# Can be as required: ON | OFF | Email

#

Serversignature ON

#

# Aliases: Add the alias you need, the format is as follows:

# Alias ​​alias true name

#

# Note that if you don't have "/" on the alias, "/" is also required in the URL.

# Therefore, "/ icons" is not alias in this example.

# If the alias is ended with "/", the real name must also end with "/", # If the alias is omitted "/", then the real name must also be omitted.

#

# We use alias "/ icons /" to represent a FancyIndexed directory list, if you don't use it,

# FancyIndexing, you can comment out.

#

# Alias ​​/ icons / "/ usr / local / apache2 / icons /"

#

# Options Indexes MultiViews

# Allowoverride none

# Order allow, deny

## a f from all

#

#

# This will change ServerRoot / Manual. This alias provides the location where the man page is located.

# Even if you change your DocumentRoot. If you don't care if you have a message page,

# You can comment from it.

#

Alias ​​/ Manual "/ usr / loacl / apache2 / manual"

Options Indexes Followsymlinks MultiViews Includesnoexec

AddOutputFilter Includes HTML

ORDER ALOW, DENY

ALLOW FROM ALL

#

# Scriptalias: Specify the directory containing the service script.

# Scriptaliases is in nature, like AliaSes, except that the document here is proceed to process processing during the request.

# The "/" rule in the tail is the same as Alias

#

Scriptalias / cgi-bin / "/ usr / loacl / apache2 / cgi-bin /"

# Here is the instruction to add PHP 4 support

AddType Application / X-httpd-php .php

LoadModule PHP4_Module Modules / Libphp4.so

#

# Add MOD_CGID.C settings, mod_cgid provides UNIX sockets that use CGID

# Script interface path.

#

# Scriptsock logs / cgisock

#

# Change "/ usr / local / apache2 / cgi-bin" to your ScriptaliaSed specified CGI directory,

# If you are configured.

#

ALLOWOVERRIDE NONE

Options none

ORDER ALOW, DENY

ALLOW FROM ALL

#

# Redirect Allows you to tell the client to use the document existing in the server name space,

# Instead now, this helps customers locate those documents that change the location.

# E.g:

# Redirect permanent / foo

http://httpd.ache.org/doc-2.0/ "Target =" _ bl ... pd.ache.org/doc-2.0/ > to achieve more information about these instructions

#

# Don't just read these instructions information without understanding it.

# This is just a simple explanation, if you don't have a reference online file, you will be warned.

#

# These configuration instructions are divided into three parts:

# 1. Control the part of the entire Apache server behavior (ie global environment variable)

# 2. Define instructions for the primary or default service parameters, and provide the default setting parameters for all virtual hosts.

# 3. Setting parameters for virtual hosts

#

# Configuration and Log File Name: If your specified file name is "/" (Win32 "Dirver: /"),

# The server will use the absolute path, if the file name is not "/", then it will put serverroot

# 的 value is attached to the front of the file name, for example, for "logs / foo.log", if the value of ServerRoot

# Is "/ usr / local / apache2", the file should be "/usr/local/apache2/logs/foo.log"

#

## 第一 区: Global Environmental Parameters

#

# The parameters set here will affect the behavior of the entire Apache server;

#, For example, the quantity of concurrent requests that can process the Apache.

#

#ServerRoot: Indicates the root directory that the server saves its configuration, error, and log files.

#

#note! If you want to specify it as a location on NFS or other networks,

# Please read the document related to LockFile (maybe

#

#

# Serial access locks must be saved on local disks

#

#Lockfile logs / affept.lock

#SCoreboardFile: The file used to save the internal service process information.

# If it is not specified (default), the scoreboard will be saved in an anonymous shared memory segment.

# And it cannot be used by third party software.

# If you specify, make sure you can't use two apache to use the same bracket file,

# This note panel file must be saved on the local disk.

#

#Scoreboardfile logs / apache_runtime_status

#

#PIDFILE: Record the file of the server startup process number.

#

Pidfile logs / httpd.pid

#

#Timeout: Timeouts before receiving and sending

#

TIMEOUT 300

#

#Keepalive: Whether a solid connection is allowed (there are multiple requests for each connection),

#. Set to "OFF".

#

Keepalive ON

#

#MaxkeepaliveRequests: The maximum number allowed during the stable connection,

# Set to 0 means no restriction access.

# 我们 推荐 You will set it to a larger value in order to improve performance

MaxkeepaliveRequests 100

#

#Keepalivetimeout: The number of seconds received from the same customer on the same connection

#

KeepaliveTimeout 15

##

## Server-pool size setting (for MPM)

##

# Prefork mpm

# StartServers: The number of processes started when the server starts

# MinSpareServers: Minimum number of spare processes

# MaxSpareServers: Maximum number of spare processes

# MaxClients: The maximum number of processes allowed by the server

# MaxRequestSperchild: A maximum number of requests allowed by a service process

StartServers 5

MinSpareServers 5

MaxSpareServers 10

MaxClients 150

MaxRequestperChild 0

# Worker MPM

# StartServers: Number of service processes when the server starts

# MaxClients: Maximum number of users allowed at the same time

# Minsparethreads: Number of minimum working threads

# MaxSparethreads: Number of maximum working threads allowed

# Threadsperchild: Work thread constant in each service process

# MaxRequestsperchild: The maximum number of requests allowed in the service process

STARTSERVERS 2

MaxClients 150

Minsparethreads 25

Maxsparethreads 75

ThreadsperChild 25

MaxRequestSperChild 0

# Perchild MPM

# Numservers: Number of service processes

# StartThreads: The number of starting threads in each service process

# Minsparethreads: Number of minimum threads

# MaxSparethreads: The maximum number of threads guaranteed

#Maxthreadsperchild: Maximum number of threads allowed for each service process

# MaxRequestSperchild: Each service process allows the maximum number of connections

Numservers 5

StartThreads 5

Minsparethreads 5

Maxsparethreads 10

MaxthreadsperChild 20

MaxRequestSperChild 0

# Winnt MPM

# Threadsperchild: Working thread constant in the service process

# MaxRequestSperchild: The maximum number of requests allowed by the service process

ThreadsperChild 250

MaxRequestSperChild 0

#BEOS MPM

# StartThreads: The number of threads that start when the server starts

# MaxClients: The maximum number of threads that can be started (a thread is equal to one user)

# MaxRequestsPERTHREAD: Maximum number of requests allowed for each thread

StartThreads 10

MaxClients 50

MaxRequestsPERTHREAD 10000

# NetWare MPM

# ThreadStachSize: Stack size assigned to each working thread

# StartThreads: The number of threads that start when the server starts

# Minsparethreads: Idle thread used to handle the real request

#Maxsparethreads: The maximum number of idle threads

# Maxthreads: Maximum number of threads at the same time

# MaxRequestperChild: The maximum number of thread service requests,

# Recommend it to 0 to achieve unlimited access

Threadstacksize 65536

StartThreads 250

Minsparethreads 25

Maxsparethreads 250

Maxthreads 1000

MaxRequestperChild 0

# Os / 2 mpm

# StartServers: Quantity of the startup service process

# Minsparethreads: Minimum idle thread per process allowed

#Maxsparethreads: Maximum idle thread per process allowed

# MaxRequestSperchild: Maximum number of connections allowed for each service process

STARTSERVERS 2

Minsparethreads 5

Maxsparethreads 10

MaxRequestSperChild 0

#

# Listen: Allows you to bind the Apache service to the specified IP address and port to replace the default value

# See instruction

# Use the following command to make Apache only listen on the specified IP address,

# To prevent it from listening on IP address 0.0.0.0

#

# Listen 12.34.56.78:80

Listen 80

#

# Dynamic Sharing Support (DSO)

#

# In order to be able to use functions in modules compiled in DSO mode, you must have the corresponding "loadModule" line,

# Therefore, these instructions are included here so that it can be activated before use.

# The static compiler module does not need to be listed here (ie the modules listed in "httpd -l")

#

# 图 例::

# Loadingmodule foo_module modules / mod_foo.so

#

#

# ExtendedStatus: When "Server-Status" is called, the control Apache is a "full" state.

# 信息dededStatus ON, or generates basic information (ExtendedStatus OFF).

# 认 为 OFF

#

# ExtendedStatus ON

### 第 二: "Lord" service configuration

#

# This area establishes a directive value for the "master" server to respond to those who are not

# Define any request for processing.

# These values ​​also provide default values ​​to the container defined later. # If there is definition in , the directive value defined here will be

The definition of # covered.

#

#

# If you want httpd to run in another user or group, you must start in root mode when starting

# And then switch it to the user or group you want to use.

#

# User / group: Users and groups running httpd

# Use "User Nouser" and "Group NOGROUP" on SCO (ODT3)

# On HPUX, you may not be able to use Shared Memory as Nobody, it is recommended to create a WWW user.

# Note Some cores (KERNEL) reject setgid (group) or SemctL (IPC_set) when group ID is greater than 60000.

# Do not use "Group # -1" on these systems.

#

User Nobody

GROUP # -1

#

# ServerAdmin: Your email address, Apache will send you an email when a problem occurs.

# As an error document, this address is displayed on the server-generated page,

# 例如 例如: admin@your-domain.com

#

ServerAdmin

Kreny@sina.com

#

# ServerName Specifies Apache to identify its own name and port number.

# Usually this value is automatically specified, but we recommend that you explicitly specify it to prevent errors from starting.

#

# If you specify an invalid DNS name for your host, Server-generated redirect will not work.

# See UsecanonicalName Directive

#

# If your host is not registered with a DNS name, type it here IP address

# In any case, you must use its IP address to provide services.

# Here, use an easy understanding manner to redirect services

ServerName

# When set to "ON", Apache will use the value of the ServerName instruction.

#

Usecanonicalname OFF

#

# DocumentRoot: The root directory of your document. By default, all requests answers from this directory.

# However, you can use symbolic links and alias to point to other locations.

#

Documentroot "/ home / redhat / public_html"

#

# Apache Accommodates Each directory can be configured with access rights (including its subdirectory).

#

# First, we configure a highly restricted feature.

# This will prohibit access to the directory where the file system is located and add the directory block you want to access.

# As follows

ORDER DENY, ALOW

Deny from all

#

# Note From here, you must express which special features can be used.

# - So, if Apache doesn't work like you expect,

# Please check if you are clearly specified below.

#

#

# This will change to Documentroot you set

#

#

# Options: This command can be "none", "all", or any combination of the following options:

# 中d es inclus Followsymlinks Symlinksifownermatch Execcgi MultiViews

#

# Note that "MultiViews" must be explicitly specified, "Options All" cannot provide you with this feature.

#

# This instruction is both complex and important, please see

# "

Http://httpd.apache.org/docs-2.0/mo ...> Enzyme  嗟 嗟 畔?? lt; / a>

#

Options Followsymlinks

#

# AllowOverride Controls the instructions that are placed in the .htaccess file.

# It can be "all", "none", or a combination of the following instructions:

# Options fileInfo authconfig limited

#

ALLOWOVERRIDE NONE

#

# Control Who can get a service.

#

ORDER ALOW, DENY

ALLOW FROM ALL

#

# Userdir: Specifies the directory name that will be added to the user home directory when you get one ~ user request.

#

Userdir public_html

# To prevent vulnerabilities on the UserDir instruction, set up the root user

# "./" This Userdir is very useful.

# If you use Apache 1.3 or above, we strongly recommend you

# In your server configuration file contains the following line

Userdir disabled root

#

# 下 below is an example of a read-only property using the userdir directory to make a site:

#

#

# Allowoverride fileinfo authconfig limited indexes

# Options MultiViews INDEXES SYMLINKSIFOWNERMATCH INCLUDENOEXEC

#

# Order allow, deny

# Allow from all

#

#

# Order deny, allow

# Deny from all

#

#

#

# DirectoryIndex: Define Request is a directory, Apache provides the user's file name to the user

#

# Index.html.var file (a type image file) is used to provide a list of documents,

# For the same purpose, you can use the multiviews option, but it will be very slow.

#

DirectoryIndex index.php index.html index.html.var

#

# AccessFileName: The file name of the file that provides additional configuration instructions is provided in each directory.

# See Allowoverride Directive.

#

AccessFileName .htaccess #

# The following rows prevents .htaccess and .htpasswd files are viewed by the web customer.

#

ORDER ALOW, DENY

Deny from all

#

# TypeConfig: Where to query mime.types files in the definition.

#

TypeConfig conf / mime.types

#

# DefaultType: Definition When you cannot determine the default MIME type provided by the server when the MIME type is not determined.

# If your service mainly contains text or html document, "Text / Plain" is a good choice;

# If most is a binary document, such as software or images, you should use

# "Application / Octer-Stream" to prevent browser from displaying binary files as text.

#

DefaultType Text / Plain

#

# MOD_MIME_MAGIC Allows the server to use different clues from their own type of file (HINTS),

# This MIMEMAGICFILE directive defines the file where the Hints definition is located.

#

MimeMagicfile conf / magic

#

# Hostnamelookups: Specifies the name of the recorder or an IP address, for example, when this directive is ON

# Record the host name, such as www.apache.org; record IP address when OFF, 204.62.129.132.

# The default value is OFF, this is much better than set to ON, because if it is set to ON, each user request will be

# At least a query for Nameserver.

#

Hostnamelookups off

#

# Enablemap: Controls whether to perform memory dump (if the operating system is supported).

# 认 为 on, if your server is installed on the network file system (NFS), turn it off.

# On some systems, close it will increase system performance (independent of file system type);

# Please refer to

http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile "target =" ... E.Org/docs-2.0/mo...#ENABLESENDFILE

#

# Enablesendfile off

#

# RRLOG: Error log file positioning.

# If you don't define an ErrorLog instruction in , this virtual host's error message

# Will be recorded here. If you define ERRORLOG there, these error messages will be recorded in you.

# In a defined file, not the file defined here.

#

ERRORLOG logs / error_log

#

# Loglevel: Controls the number of log information recorded in the error log file.

# Possible values ​​include: Debug, Info, NOTICE, WARN, Error, crit, Alert, Emerg.

#

Loglevel Warn

#

# The following instruction defines the format alias for the Customlog command.

#

Logformat "% H% L% u% T /"% r / "%> s% b /"% {referer} I / "/"% {user-agent} i / "combined

Logformat "% H% L% u% T /"% r / "%> s% B" CommON

Logformat "% {referer} i ->% u" Referer

Logformat "% {User-agent} i" Agent

# You need to install the MOD_LOGIO.C module to use% i and% o.

# Logformat "% H% L% U% T /"% r / "%> s% b /"% {referer} I / "/"% {user-agent} I / "% i% o" combinedio

#

# Specify the positioning and format of the access log file (general log format).

# If you don't define this instruction within , transfer information will be recorded here,

# If you define this instruction, record the location you specified instead of this defined location.

#

Customlog logs / Access_log Common

#

# If you want to record the Agent and Referer information, you can use the following instructions.

#

# Customlog Logs / Referer_log Referer

# Customlog Logs / Agent_log Agent

#

# If you want to use a file to record Access, Agent, and Referer information,

# You can define this command as follows:

#

# Customlog logs / access_log combined

#

# ServerToKens

# This instruction definition is included in the information type in the HTTP response header. Default "full",

# This means that the operating system type and compilation information in the module are included in the response header.

# Can be set to one of the columns:

# Full | OS | Minor | MINIMAL | Major | Prod

# Full conveys the most information, and the Prod is at least.

#

ServerToKens Full

#

# 随意 加加 加 包 包 信息 信息 信息 信息 信息 信息 一 中 中 到 中 到 到 到

# (Internal error document, FTP directory list, mod_status, and mod_info output, etc., in addition to CGI errors

# 或 或 自 错 文 文 文 错

# Set to "email" will contain a MailTo pointing to ServerAdmin: connection.

# Can be as required: ON | OFF | Email

#

Serversignature ON

#

# Aliases: Add the alias you need, the format is as follows: # alias alias true name

#

# Note that if you don't have "/" on the alias, "/" is also required in the URL.

# Therefore, "/ icons" is not alias in this example.

# If the alias is ended with "/", then the real name must also end with "/".

# If the alias is omitted "/", the real name must also be omitted.

#

# We use alias "/ icons /" to represent a FancyIndexed directory list, if you don't use it,

# FancyIndexing, you can comment out.

#

# Alias ​​/ icons / "/ usr / local / apache2 / icons /"

#

# Options Indexes MultiViews

# Allowoverride none

# Order allow, deny

## a f from all

#

#

# This will change ServerRoot / Manual. This alias provides the location where the man page is located.

# Even if you change your DocumentRoot. If you don't care if you have a message page,

# You can comment from it.

#

Alias ​​/ Manual "/ usr / loacl / apache2 / manual"

Options Indexes Followsymlinks MultiViews Includesnoexec

AddOutputFilter Includes HTML

ORDER ALOW, DENY

ALLOW FROM ALL

#

# Scriptalias: Specify the directory containing the service script.

# Scriptaliases is in nature, like AliaSes, except that the document here is proceed to process processing during the request.

# The "/" rule in the tail is the same as Alias

#

Scriptalias / cgi-bin / "/ usr / loacl / apache2 / cgi-bin /"

# Here is the instruction to add PHP 4 support

AddType Application / X-httpd-php .php

LoadModule PHP4_Module Modules / Libphp4.so

#

# Add MOD_CGID.C settings, mod_cgid provides UNIX sockets that use CGID

# Script interface path.

#

# Scriptsock logs / cgisock

#

# Change "/ usr / local / apache2 / cgi-bin" to your ScriptaliaSed specified CGI directory,

# If you are configured.

#

ALLOWOVERRIDE NONE

Options none

ORDER ALOW, DENY

ALLOW FROM ALL

#

# Redirect Allows you to tell the client to use the document existing in the server name space,

# Instead now, this helps customers locate those documents that change the location.

# E.g:

# Redirect permanent / foo 转载请注明原文地址:https://www.9cbs.com/read-67050.html


New Post(0)