#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
Serverroot
"/ usr / loacl / apache2"
# # Serial Access Lock Will must be saved on the local disk #
<
IFModule
!
MPM_WINNT
.
c
> <
IFModule
!
MPM_NEWARE
.
c
>
#Lockfile logs / affept.lock
IFModule
>
IFModule
>
#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 the two Apache to use the same tab file, # This note panel file must be saved on the local disk. #
<
IFModule
!
MPM_NetWare
.
c
> <
IFModule
!
PERCHILD
.
c
>
#Scoreboardfile logs / apache_runtime_status
<
IFModule
> <
IFModule
>
# #PIDFILE: Record files of the server startup process number. # <
IFModule
!
MPM_NEWARE
.
c
>
PIDFile logs
/
httpd
.
PID
IFModule
>
# # #Timeout: Receive and send a time time number number #
TIMEOUT 300
# Keepalive: Whether a stable connection is allowed (multiple requests for each connection), and the # set to "OFF" is disabled. #
Keepalive ON
# #MaxkeepaliveRequests: The maximum number allowed during the stable connection, and 0 is set to 0 means unlimited 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: Starting the server started from the server Starting the number # minSpareServers: Minimum number of spare processes 保 # #号 # MaxSpareServers: The maximum number of spare processes # MaxClients: The maximum number of processes allowed by the server allowed # maxRequestSperChild: A maximum number of requests allowed by a service process
<
IFModule Prefork
.
c
>
StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestperChild 0
IFModule
>
#Worker MPM # StartServers: Server starts at the number of services in the server # maxclients: Allow the maximum number of users to connect to the number # minsparethreads: Maximum Working thread number # maxSparethreads: Allowed Maximum Work Thread Number # threadsperchild: Each service process Work Thread Constant # maxrequestsperchild: The maximum number of requests allowed in the service process
<
IFModule Worker
.
c
>
StartServers 2 MaxClients 150 Minsparethreads 25 MaxSparethreads 75 ThreadsperChild 25 MaxRequestsperChild 0
IFModule
>
# Perchild MPM # Numservers: The number of service processes # startthreads: The number of starting threads in each service process # minsparethreads: The minimum thread 保 保 号 号 # MaxSparethreads: The maximum number of threads that hold the maximum cell: Maximum number of threads per service process # MaxRequestSperchild: Each service process allows the maximum number of connections
<
IFModule Perchild
.
c
>
Numservers 5 StartThreads 5 Minsparethreads 5 MaxSparethreads 10 MaxthreadsperChild 20 MaxRequestsperChild 0
IFModule
>
#Winnt MPM # threadsperchild: Working thread in the service process # maxRequestSperChild: The maximum number of requests allowed by the service process
<
IFModule MPM_WINNT
.
c
>
Threadsperchild 250 MaxRequestsperchild 0
IFModule
>
#BEOS MPM # startthreads: The number of threads started 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 <
IFModule Beos
.
c
>
Startthreads 10 MaxClients 50 MaxRequestsPERTHREAD 1000
IFModule
>
# NetWare MPM # ThreadStachSize: The stack size for each working thread # startthreads: The number of threads started when the server starts # minsparethreads: The maximum number of idle threads used to handle the real request: Idle thread maximum number # Maxthreads: The maximum number of threads of the same time # maxRequestperChild: The maximum number of thread service requests, # recommended to set it to 0 to achieve unlimited access
<
IFModule MPM_NetWare
.
c
>
Threadstacksize 65536 Startthreads 250 Minsparethreads 250 MaxSparethreads 250 Maxthreads 1000 MaxRequestperChild 0
IFModule
>
# Os / 2 MPM # StartServers: Started Service Process Quantity # MINSPARETHREADS: Minimum Idle Threads Allowed for Each Process # MaxSparethreads: Maximum Idle Threads Allowed for Each Process: Each service process allows for maximum connections
<
IFModule MPMT_OS2
.
c
>
StartServers 2 MinSparethreads 5 MaxSparethreads 10 MaxRequestsperChild 0
IFModule
>
# # Listen: Allows you to bind the Apache service to the specified IP address and port to replace the default value # See
Listen 80
# # Dynamic Sharing Support (DSO) # # In order to be able to use functions in modules compiled in DSO mode, you must have a corresponding "loadModule" line, and therefore, here, these instructions are included so that before using it activation. # The static compile module does not need to list (ie, the module listed in "httpd -l") # # Example: # loadingmodule foo_module modules / mod_foo.so # # # extendedStatus: When calling "Server-Status" Control Apache is generating "full" state # information (ExtendedStatus ON) or produces basic information (ExtendedStatus OFF). # 认 为 o # ### 第 二 二: "Main" service configuration # # This area establishes the command value used by the "master" server to respond to any requests that are not handled by
<
IFModule
!
MPM_WINNT
.
c
> <
IFModule
!
MPM_NEWARE
.
c
>
# # If you want to run HTTPD to run in another user or group, you must start with root in the start of the # 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) in group ID, and do not use "Group # -1" on these systems. #
User NoBody Group
#-1
IFModule
>
IFModule
>
# # Serveradmin: Your email address, Apache will send you an email when there is a problem. # As an error document, this address is displayed on the server-generated page, # for example: admin@your-domain.com #
ServerAdmin
[
]
Kreny
@
sina
.
COM
[/
]
# # Servername Specifies Apache to identify its own name and port number. #Mhus, this value is automatically specified, but we recommend that you explicitly specify it to prevent the error when you start the error # # If you specify an invalid DNS name for your host, the server-generated redirection will not work. # See Usecanonicalname instruction # # If your host is not registered with the DNS name, type it here IP address #Exex, you must use its IP address to provide services, # here uses an easy understanding manner to redirect services
Servername
<
a href
=
"http://www.dalouis.com:80"
Target
=
"_blank"
>
WWW
.
Dalouis
.
COM
:
80
a
>
# # UsecanonicalName: Decide how Apache constructs the instructions of URLS and Server_Name and Server_Port. # When set to "OFF", Apache will use the host name and port number provided by the client. # 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 Access permission (including its subdirectory). # # First, we configure a high-constrained 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
<
Directory
/>
ORDER DENY
,
Allow Deny from ALL
Directory
>
# # 注意 注意 从 开始 你 你 你 明 地 确 明 明 地 确 这里 这里 这里 这里 这里 这里 这里 明.. 明 明# - So, if Apache doesn't work as you expect, # Please check if you are specifying it available below. # # # This will change to Documentroot you set.
<
Directory
"/ home / redhat / public_html">
# # Options: The value of this command can be "None", "all", or any combination of the following options: # indexes include FollowSymlinks SymlinksifownerMatch Execcgi MultiViews # # Note that "MultiViews" must be explicitly specified, "Options all" Can't provide you with this feature. # ## This instruction is both complex and important, please refer to # " 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 a combination of "all", "none", or the following instructions: #boptions fileinfo authconfig limited #
ALLOWOVERRIDE NONE
# # Control Who can get a service. #
ORDER ALOW
,
Deny Allow from ALL
Directory
>
# # 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, Userdir set to the root user # "./" is very useful. # If you use Apache 1.3 or above, we strongly recommend that you contain the following lines in your server profile.
Userdir disabled root
# # The following is an UserDir instructions cause a directory site example having a read-only property: # #
DirectoryIndex INDEX
.
PHP Index
.
HTML INDEX
.
HTML
.var
# # Accessfilename: The file name of the file that provides additional configuration instructions in each directory is queried. # See Allowoverride Directive. #
AccessFileName
.
HTACCESS
# # The following rows prevents .htaccess and .htpasswd files are viewed by the web customer. #
<
Files ~
"^ .ht"
>
ORDER ALOW
,
Deny deny from all
Files
>
# # Typeconfig: Where to query the mime.types file where to define. #
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 binary document, such as software or images, you should use # "Application / Octer-Stream" to prevent browsers A binary file is displayed like a text. #
DefaultType Text
/
Plain
# # mod_mime_magic Allows the server to use different clues from themselves to define their own types of files, and # this MIMEMAGICFILE instruction defines the file where HINTS definitions are located. #
<
IFModule MOD_MIME_MAGIC
.
c
>
Mimemagicfile confed
/
Magic
IFModule
>
# # Hostnamelookups: Specifies the name of the user or IP address, for example, when this directive is ON # 记 host name, such as www.apache.org; record IP address, 204.62.129.132 when OFF, 204.62.129.132. # The default value is OFF, which is much better than set to ON, because if it is set to ON, each user request will # at least a query for Nameserver. #
Hostnamelookups off
# # Enablemmap: 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); # for example, see http://httpd.apache.org/docs-2.0/mo...html#enablemap # # Enablemmap off # # EnablesendFile: Controls if you use SendFile Kernel to send file # (If the operating system is supported). The default is ON, if your server is installed on the Network File System # (NFS), please close it. # See http://httpd.apache.org/docs-2.0/mo ... # Enablesendfile # # Enablesendfile Off # # ErrorLog: Error Log File Location. # If you don't define an ErrorLog instruction within
/
Error_log
# # Loglevel: Control 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
Customlog logs
/
Access_log common # # If you want to record Agent and Referer information, you can use the following instruction # # Customlog logs / referer_log referer # CustomLog logs / agent_log agent # # If you want to use a file record Access, Agent, and Referer information, # You can define this command as follows: # #ustomlog logs / access_log combined # # serverToKens # This command defines the type of information contained in the HTTP response header. The default is "full", # this means that the operating system type and compilation information in the module are included in the response header. # You can be set to one of the columns: #full | OS | Minor | Minimal | Major | Prod # full of information conveyed, and Ltd. #
ServerToKens Full
# # 随意 加加加 信息 等 一 名 g g 错 错 错 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文. # 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 # # # 注意, if you contain "the unlucky" / ", then" / "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 the FancyIndexed directory list, if you don't use, # fancyIndexing, you can comment. # # Alias / icons / "/ usr / local / apache2 / icons /" #
Alias
/
manual
"/ usr / loacl / apache2 / manual"
<
Directory
"/ usr / local / apache2 / manual"
>
Options INDEXES FOLLOWSYMLINKS MULTIVIEWS INCLUDESNOEXEC AddOutputFilter Includes HTML Order Allow
,
Deny Allow from ALL
Directory
>
# # 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
<
IFModule MOD_CGID
.
c
>
# # Add mod_cgid.c settings, MOD_CGID provides a # script interface path of UNIX sockets using CGID. # # Scriptsock logs / cgisock
IFModule
>
# # "/ Usr / local / apache2 / cgi-bin" is changed to your ScriptaliaSed specified CGI directory, # if you are configured. #
<
Directory
"/ usr / local / apache2 / cgi-bin"
>
ALLOWOVERRIDE NONE OPTIONS NONE ORDER ALOW
,
Deny Allow from ALL
Directory
>
# # Redirect Allows you to tell the client to use documents existing in the server name space, # instead of present, which helps customers locate documents that change the location. #, For example: # redirect permanent / foo http://www.example.com/bar # # Control Server -generated directory list displayed instruction # # indexoptions: Control Server-Generated Directory list display feature. #
IndexOptions FancyIndexing Versions
# # Addicon * instruction tells the server how to display the image files of different extensions, # only for FancyIndexed instructions #
AddiconbyEncoding
(
CMP
, /
Icons
/
Compressed
.
GIF
)
x
-
Compress X
-
Gzip AddiconBytype
(
TXT
, /
Icons
/
TEXT
.
GIF
)
TEXT
#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
"/ usr / loacl / apache2"
# # Serial Access Lock Will must be saved on the local disk #
<
IFModule
!
MPM_WINNT
.
c
> <
IFModule
!
MPM_NEWARE
.
c
>
#Lockfile logs / affept.lock
IFModule
>
IFModule
>
#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 the two Apache to use the same tab file, # This note panel file must be saved on the local disk. #
<
IFModule
!
MPM_NetWare
.
c
> <
IFModule
!
PERCHILD
.
c
>
#Scoreboardfile logs / apache_runtime_status
<
IFModule
> <
IFModule
>
# #PIDFILE: Record files of the server startup process number. # <
IFModule
!
MPM_NEWARE
.
c
>
PIDFile logs
/
httpd
.
PID
IFModule
>
# # #Timeout: Receive and send a time time number number #
TIMEOUT 300
# Keepalive: Whether a stable connection is allowed (multiple requests for each connection), and the # set to "OFF" is disabled. #
Keepalive ON
# #MaxkeepaliveRequests: The maximum number allowed during the stable connection, and 0 is set to 0 means unlimited 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: Starting the server started from the server Starting the number # minSpareServers: Minimum number of spare processes 保 # #号 # MaxSpareServers: The maximum number of spare processes # MaxClients: The maximum number of processes allowed by the server allowed # maxRequestSperChild: A maximum number of requests allowed by a service process
<
IFModule Prefork
.
c
>
StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestperChild 0
IFModule
>
#Worker MPM # StartServers: Server starts at the number of services in the server # maxclients: Allow the maximum number of users to connect to the number # minsparethreads: Maximum Working thread number # maxSparethreads: Allowed Maximum Work Thread Number # threadsperchild: Each service process Work Thread Constant # maxrequestsperchild: The maximum number of requests allowed in the service process
<
IFModule Worker
.
c
>
StartServers 2 MaxClients 150 Minsparethreads 25 MaxSparethreads 75 ThreadsperChild 25 MaxRequestsperChild 0
IFModule
>
# Perchild MPM # Numservers: The number of service processes # startthreads: The number of starting threads in each service process # minsparethreads: The minimum thread 保 保 号 号 # MaxSparethreads: The maximum number of threads that hold the maximum cell: Maximum number of threads per service process # MaxRequestSperchild: Each service process allows the maximum number of connections
<
IFModule Perchild
.
c
>
Numservers 5 StartThreads 5 Minsparethreads 5 MaxSparethreads 10 MaxthreadsperChild 20 MaxRequestsperChild 0
IFModule
>
#Winnt MPM # threadsperchild: Working thread in the service process # maxRequestSperChild: The maximum number of requests allowed by the service process
<
IFModule MPM_WINNT
.
c
>
Threadsperchild 250 MaxRequestsperchild 0
IFModule
>
#BEOS MPM # startthreads: The number of threads started 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 <
IFModule Beos
.
c
>
Startthreads 10 MaxClients 50 MaxRequestsPERTHREAD 1000
IFModule
>
# NetWare MPM # ThreadStachSize: The stack size for each working thread # startthreads: The number of threads started when the server starts # minsparethreads: The maximum number of idle threads used to handle the real request: Idle thread maximum number # Maxthreads: The maximum number of threads of the same time # maxRequestperChild: The maximum number of thread service requests, # recommended to set it to 0 to achieve unlimited access
<
IFModule MPM_NetWare
.
c
>
Threadstacksize 65536 Startthreads 250 Minsparethreads 250 MaxSparethreads 250 Maxthreads 1000 MaxRequestperChild 0
IFModule
>
# Os / 2 MPM # StartServers: Started Service Process Quantity # MINSPARETHREADS: Minimum Idle Threads Allowed for Each Process # MaxSparethreads: Maximum Idle Threads Allowed for Each Process: Each service process allows for maximum connections
<
IFModule MPMT_OS2
.
c
>
StartServers 2 MinSparethreads 5 MaxSparethreads 10 MaxRequestsperChild 0
IFModule
>
# # Listen: Allows you to bind the Apache service to the specified IP address and port to replace the default value # See
Listen 80
# # Dynamic Sharing Support (DSO) # # In order to be able to use functions in modules compiled in DSO mode, you must have a corresponding "loadModule" line, and therefore, here, these instructions are included so that before using it activation. # The static compile module does not need to list (ie, the module listed in "httpd -l") # # Example: # loadingmodule foo_module modules / mod_foo.so # # # extendedStatus: When calling "Server-Status" Control Apache is generating "full" state # information (ExtendedStatus ON) or produces basic information (ExtendedStatus OFF). # 认 为 o # ### 第 二 二: "Main" service configuration # # This area establishes the command value used by the "master" server to respond to any requests that are not handled by
<
IFModule
!
MPM_WINNT
.
c
> <
IFModule
!
MPM_NEWARE
.
c
>
# # If you want to run HTTPD to run in another user or group, you must start with root in the start of the # 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) in group ID, and do not use "Group # -1" on these systems. #
User NoBody Group
#-1
IFModule
>
IFModule
>
# # Serveradmin: Your email address, Apache will send you an email when there is a problem. # As an error document, this address is displayed on the server-generated page, # for example: admin@your-domain.com #
ServerAdmin
[
]
Kreny
@
sina
.
COM
[/
]
# # Servername Specifies Apache to identify its own name and port number. #Mhus, this value is automatically specified, but we recommend that you explicitly specify it to prevent the error when you start the error # # If you specify an invalid DNS name for your host, the server-generated redirection will not work. # See Usecanonicalname instruction # # If your host is not registered with the DNS name, type it here IP address #Exex, you must use its IP address to provide services, # here uses an easy understanding manner to redirect services
Servername
<
a href
=
"http://www.dalouis.com:80"
Target
=
"_blank"
>
WWW
.
Dalouis
.
COM
:
80
a
>
# # UsecanonicalName: Decide how Apache constructs the instructions of URLS and Server_Name and Server_Port. # When set to "OFF", Apache will use the host name and port number provided by the client. # 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 Access permission (including its subdirectory). # # First, we configure a high-constrained 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
<
Directory
/>
ORDER DENY
,
Allow Deny from ALL
Directory
>
# # 注意 注意 从 开始 你 你 你 明 地 确 明 明 地 确 这里 这里 这里 这里 这里 这里 这里 明.. 明 明# - So, if Apache doesn't work as you expect, # Please check if you are specifying it available below. # # # This will change to Documentroot you set.
<
Directory
"/ home / redhat / public_html">
# # Options: The value of this command can be "None", "all", or any combination of the following options: # indexes include FollowSymlinks SymlinksifownerMatch Execcgi MultiViews # # Note that "MultiViews" must be explicitly specified, "Options all" Can't provide you with this feature. # ## This instruction is both complex and important, please refer to # " 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 a combination of "all", "none", or the following instructions: #boptions fileinfo authconfig limited #
ALLOWOVERRIDE NONE
# # Control Who can get a service. #
ORDER ALOW
,
Deny Allow from ALL
Directory
>
# # 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, Userdir set to the root user # "./" is very useful. # If you use Apache 1.3 or above, we strongly recommend that you contain the following lines in your server profile.
Userdir disabled root
# # The following is an UserDir instructions cause a directory site example having a read-only property: # #
DirectoryIndex INDEX
.
PHP Index
.
HTML INDEX
.
HTML
.var
# # Accessfilename: The file name of the file that provides additional configuration instructions in each directory is queried. # See Allowoverride Directive. #
AccessFileName
.
HTACCESS
# # The following rows prevents .htaccess and .htpasswd files are viewed by the web customer. #
<
Files ~
"^ .ht"
>
ORDER ALOW
,
Deny deny from all
Files
>
# # Typeconfig: Where to query the mime.types file where to define. #
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 binary document, such as software or images, you should use # "Application / Octer-Stream" to prevent browsers A binary file is displayed like a text. #
DefaultType Text
/
Plain
# # mod_mime_magic Allows the server to use different clues from themselves to define their own types of files, and # this MIMEMAGICFILE instruction defines the file where HINTS definitions are located. #
<
IFModule MOD_MIME_MAGIC
.
c
>
Mimemagicfile confed
/
Magic
IFModule
>
# # Hostnamelookups: Specifies the name of the user or IP address, for example, when this directive is ON # 记 host name, such as www.apache.org; record IP address, 204.62.129.132 when OFF, 204.62.129.132. # The default value is OFF, which is much better than set to ON, because if it is set to ON, each user request will # at least a query for Nameserver. #
Hostnamelookups off
# # Enablemmap: 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); # for example, see http://httpd.apache.org/docs-2.0/mo...html#enablemap # # Enablemmap off # # EnablesendFile: Controls if you use SendFile Kernel to send file # (If the operating system is supported). The default is ON, if your server is installed on the Network File System # (NFS), please close it. # See http://httpd.apache.org/docs-2.0/mo ... # Enablesendfile # # Enablesendfile Off # # ErrorLog: Error Log File Location. # If you don't define an ErrorLog instruction within
/
Error_log
# # Loglevel: Control 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
Customlog logs
/
Access_log common # # If you want to record Agent and Referer information, you can use the following instruction # # Customlog logs / referer_log referer # CustomLog logs / agent_log agent # # If you want to use a file record Access, Agent, and Referer information, # You can define this command as follows: # #ustomlog logs / access_log combined # # serverToKens # This command defines the type of information contained in the HTTP response header. The default is "full", # this means that the operating system type and compilation information in the module are included in the response header. # You can be set to one of the columns: #full | OS | Minor | Minimal | Major | Prod # full of information conveyed, and Ltd. #
ServerToKens Full
# # 随意 加加加 信息 等 一 名 g g 错 错 错 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文. # 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 # # # 注意, if you contain "the unlucky" / ", then" / "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 the FancyIndexed directory list, if you don't use, # fancyIndexing, you can comment. # # Alias / icons / "/ usr / local / apache2 / icons /" #
Alias
/
manual
"/ usr / loacl / apache2 / manual"
<
Directory
"/ usr / local / apache2 / manual"
>
Options INDEXES FOLLOWSYMLINKS MULTIVIEWS INCLUDESNOEXEC AddOutputFilter Includes HTML Order Allow
,
Deny Allow from ALL
Directory
>
# # 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
<
IFModule MOD_CGID
.
c
>
# # Add mod_cgid.c settings, MOD_CGID provides a # script interface path of UNIX sockets using CGID. # # Scriptsock logs / cgisock
IFModule
>
# # "/ Usr / local / apache2 / cgi-bin" is changed to your ScriptaliaSed specified CGI directory, # if you are configured. #
<
Directory
"/ usr / local / apache2 / cgi-bin"
>
ALLOWOVERRIDE NONE OPTIONS NONE ORDER ALOW
,
Deny Allow from ALL
Directory
>
# # Redirect Allows you to tell the client to use documents existing in the server name space, # instead of present, which helps customers locate documents that change the location. #, For example: # redirect permanent / foo http://www.example.com/bar # # Control Server -generated directory list displayed instruction # # indexoptions: Control Server-Generated Directory list display feature. #
IndexOptions FancyIndexing Versions
# # Addicon * instruction tells the server how to display the image files of different extensions, # only for FancyIndexed instructions #
AddiconbyEncoding
(
CMP
, /
Icons
/
Compressed
.
GIF
)
x
-
Compress X
-
Gzip AddiconBytype
(
TXT
, /
Icons
/
TEXT
.
GIF
)
TEXT