For beginners and me
#
# Configuration file based on NCSA service.
#
#This is the main configuration file of Apache server.
#It contains configuration instructions for the server to affect the server's operation.
#See <URL:/doc-2.0/> for detailed information about these directives
#
#Don't just simply read these command information without understanding it.
#There are just a simple explanation here, and if you don't refer to the online file, you will be warned.
#
#These configuration instructions are divided into the following three parts:
#1. The part that controls the behavior of the entire Apache server (i.e., global environment variables)
#2. Directives that define main or default service parameters, and also provide default setting parameters for all virtual hosts.
#3. Setting parameters of virtual host
#
#Configuration and log file name: If the file name you specify starts with "/" (win32 with "dirver:/"),
#The server will use an absolute path, if the file name does not start with "/", then it will put ServerRoot
The value of # is appended to the file name, for example, for "logs/", if ServerRoot's value is
# is "/usr/local/apache2", then the file should be "/usr/local/apache2/logs/"
#
##Zone 1: Global Environment Parameters
#
#The parameters set here will affect the behavior of the entire Apache server;
#For example, the number of concurrent requests that Apache can handle, etc.
#
#ServerRoot: indicates the root directory where the server saves its configuration, errors, log files, etc.
#
#Notice! If you want to specify it as a location on NFS or other network,
#Please be sure to read the documents related to LockFile (maybe in
#<URL:/docs-2.0/mod/mpm_common.html#lockfile>)。
#This will allow you to solve many problems yourself.
#
#Do not add slashes at the end of the path.
#
ServerRoot "/usr/loacl/apache2"
#
#The lock file for serial access must be saved on the local disk.
#
<IfModule !mpm_winnt.c>
<IfModule !mpm_neware.c>
#LockFile logs/
</IfModule>
</IfModule>
#ScoreBoardFile: The file used to save internal service process information.
#If not specified (default), the scoreboard will be saved in an anonymous shared memory segment,
#And it cannot be used by third-party software.
#If specified, make sure that you cannot use the same scoreboard file with two Apaches,
#This scoreboard file must be saved on the local disk.
#
<IfModule !mpm_netware.c>
<IfModule !>
#ScoreBoardFile logs/apache_runtime_status
<IfModule>
<IfModule>
#
#PidFile: The file that records the server startup process number.
#
<IfModule !mpm_neware.c>
PidFile logs/
</IfModule>
#
#Timeout: Number of timeout seconds before receiving and sending
#
Timeout 300
#
#KeepAlive: Whether to allow solid connections (each connection has multiple requests),
# Set to "Off" to disable.
#
KeepAlive On
#
#MaxKeepAliveRequests: Maximum number of requests allowed during a solid connection,
# Set to 0 means unlimited access.
#We recommend you set it to a larger value to improve performance
MaxKeepAliveRequests 100
#
#KeepAliveTimeout: The number of seconds to receive requests from the same customer on the same connection
#
KeepAliveTimeout 15
##
##Server-Pool size setting (for MPM)
##
# prefork MPM
# StartServers: The number of processes started by the server at startup
#MinSpareServers: The minimum number of retained backup processes
# MaxSpareServers: The maximum number of retained backup processes
# MaxClients: The maximum number of processes allowed to start by the server
# MaxRequestsPerChild: The maximum number of requests allowed by a service process
<IfModule >
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestPerChild 0
</IfModule>
# worker MPM
# StartServers: Number of service processes when the server starts
# MaxClients: The maximum number of users allowed to connect simultaneously
#MinSpareThreads: The minimum number of worker threads maintained
# MaxSpareThreads: The maximum number of worker threads allowed
# ThreadsPerChild: Working thread constants in each service process
# MaxRequestsPerChild: The maximum number of requests allowed in the service process
<IfModule >
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
# perchild MPM
# NumServers: Number of service processes
# StartThreads: The number of starting threads in each service process
#MinSpareThreads: The minimum number of threads retained
#MaxSpareThreads: The maximum number of threads retained
# MaxThreadsPerChild: The maximum number of threads allowed per service process
# MaxRequestsPerChild: The maximum number of connections allowed per service process
<IfModule >
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>
# WinNT MPM
# ThreadsPerChild: Working thread constants 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 (one thread is equal to one user)
# MaxRequestsPerThread: The maximum number of requests allowed per thread
<IfModule >
StartThreads 10
MaxClients 50
MaxRequestsPerThread 10000
</IfModule>
# NetWare MPM
# ThreadStachSize: The stack size allocated to each worker thread
# StartThreads: The number of threads started when the server starts
#MinSpareThreads: The number of free threads used to handle actual requests
#MaxSpareThreads: Maximum number of idle threads
# MaxThreads: Maximum number of threads active at the same time
# MaxRequestPerChild: The maximum number of requests for a thread service,
# It is recommended to set it to 0 for unlimited access
<IfModule mpm_netware.c>
ThreadStackSize 65536
StartThreads 250
MinSpareThreads 25
MaxSpareThreads 250
MaxThreads 1000
MaxRequestPerChild 0
</IfModule>
# OS/2 MPM
# StartServers: Number of service processes started
#MinSpareThreads: The minimum free thread allowed by each process
#MaxSpareThreads: Maximum free thread allowed per process
# MaxRequestsPerChild: The maximum number of connections allowed by each service process
<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 the <VirtualHost> command
# Use the following command to make Apache listen only 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,
# So, these instructions are included here so that they can be activated before using it.
# Those statically compiled modules do not need to be listed here (i.e. modules listed with "httpd-l")
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
#
# ExtendedStatus: When "server-status" is called, control Apache generates a "full" state.
# Information (ExtendedStatus On) or generate basic information (ExtendedStatus Off).
# Default is off
#
# ExtendedStatus On
### District 2: "Main" service configuration
#
# This area creates instruction values used by the "main" server in response to those not being "VirtualHost>
# Define any requests processed.
# These values also provide default values to the <VirtualHost> container defined later.
# If there is a definition in <VirtualHost>, the instruction value defined here will be
# covered by the definition in <VirtualHost>.
#
<IfModule !mpm_winnt.c>
<IfModule !mpm_neware.c>
#
# If you want httpd to run as another user or group, you must start as root at the beginning
# And then switch it to the user or group you want to use.
#
# User/Group: Users and groups running httpd
# 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 that some cores refuse setgid(Group) or semctl(IPC_SET) when the group ID is greater than 60000,
Section # 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 a problem occurs.
# As an error document, this address is displayed on the server-generated page,
# For example: admin@
#
ServerAdmin kreny@
#
# ServerName specifies the name and port number used by Apache to identify itself.
# Usually this value is automatically specified, but we recommend that you specify it explicitly to prevent errors during startup.
#
# If you specify an invalid DNS name for your host, the server-generated redirect will not work.
# See the UseCanonicalName command
#
# If your host does not have a DNS name registered, type its IP address here
# Anyway, you have to use its IP address to provide the service,
# There is an easy-to-understand method for redirecting services here
ServerName :80
#
# UseCanonicalName: Directives that determine how Apache constructs URLS and SERVER_NAME and SERVER_PORT.
# When set to "Off", Apache will use the host name and port number provided by the user.
# When set to "On", Apache will use the value of the ServerName directive.
#
UseCanonicalName Off
#
#DocumentRoot: The root directory of your document. By default, all requests are answered from this directory.
# But you can use symbolic links and alias to point to other locations.
#
DocumentRoot "/home/redhat/public_html"
#
# Each directory that can be accessed by Apache can be configured with access permissions (including its subdirectories).
#
# First, we configure a high-limited feature.
# This will prohibit access to the directory where the file system resides and add the directory blocks you wish to allow access.
# See below
<Directory />
Order Deny,Allow
Deny from all
</Directory>
#
# Note from here you must clearly allow what special features to be used.
# - So, if Apache doesn't work as you expect,
# Please check if you explicitly specify that it is available below.
#
#
# This will change to the DocumentRoot you set
#
<Directory "/home/redhat/public_html">
#
# Options: The value of this directive can be "None", "All", or any combination of the following options:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be specified explicitly, and “Options All” cannot provide you with this feature.
#
# This instruction is both complex and important, please see
#"/docs-2.0/mod...??? information.
#
Options FollowSymLinks
#
# AllowOverride controls instructions placed in the .htaccess file.
# It can be "All", "None", or a combination of the following instructions:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Control who can get services.
#
Order allow,deny
Allow from all
</Directory>
#
# UserDir: Specifies the directory name that will be added to the user's home directory when a ~user request is obtained.
#
UserDir public_html
# To prevent vulnerabilities in the UserDir directive, set up for root users
# UserDir like "./" is very useful.
# If you use Apache 1.3 or above, we strongly recommend you
# Include the following line in your server configuration file
UserDir disabled root
#
# The following is an example of using the UserDir directive to make a site's directory have read-only properties:
#
# <Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit Indexes
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludeNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
# </Directory>
#
#DirectoryIndex: Define the file name of the service when the request is a directory.
#
# File (a type image file) is used to provide a document processing list,
# The MultiViews option can also be used for the same purpose, but it will be very slow.
#
DirectoryIndex
#
# AccessFileName: Query the file name of the file that provides additional configuration instructions to the directory in each directory.
# See the AllowOverride instruction.
#
AccessFileName .htaccess
#
# The following line prevents .htaccess and .htpasswd files from being viewed by web customers.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
#
#Typeconfig: Define where to query files.
#
TypeConfig conf/
#
# DefaultType: Defines the default MIME type provided by the server when the MIME type cannot be determined.
# If your service mainly contains text or HTML documents, "text/plain" is a good choice;
# If most of them are binary documents, such as software or images, you should use
# "application/octer-stream" to prevent the browser from displaying binary files like text.
#
DefaultType text/plain
#
# mod_mime_magic allows the server to use different clues (hints) from files that define their own type,
# This MIMEMagicFile directive defines the file where the hints defines it.
#
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
#
# HostnameLookups: Specify the name or IP address of the recorder. For example, when this command is on
# Record the host name, such as; Record the IP address when off, 204.62.129.132.
# The default value is off, which is much better than setting it to on, because if set to on, each user request will
# Create at least one query to the nameserver.
#
HostnameLookups Off
#
# EnableMMAP: Controls whether to perform memory dumps (if the operating system supports it).
# The default is on, if your server is installed on the network file system (NFS), please turn it off.
# On some systems, turning it off will improve system performance (not related to file system type);
# For details, please refer to /docs-2.0/mod...tml#enablemmap
#
# EnableMMAP off
#
# EnableSendfile: Controls whether to use sendfile kernel to support sending files
# (if the operating system supports it). Default is on, if your server is installed on the network file system
# (NFS), please close it.
# See/docs-2.0/mod...enablesendfile
#
# EnableSendfile off
#
# ErrorLog: Error log file location.
# If you do not define the ErrorLog directive in <VirtualHost>, the error message of this virtual host
# will be recorded here. If you define ErrorLog there, these error messages will be recorded in your
# In the file defined, not the file defined here.
#
ErrorLog logs/error_log
#
#LogLevel: Controls the amount of log information recorded in the error log file.
# Possible values include: debug, info, notice, warn, error, crit, alert, emergency.
#
LogLevel warn
#
# The following directive defines the format alias for the CustomLog directive.
#
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 location and format of the access log file (general log format).
# If you do not define this command in <VirtualHost>, the transmission information will be recorded here.
# If you define this directive, it is recorded at the location you specified, not the location defined here.
#
CustomLog logs/access_log common
#
# If you want to record 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 instruction as follows:
#
# CustomLog logs/access_log combined
#
# ServerTokens
# This directive defines the type of information contained in the HTTP response header. Default is "Full",
# This means that the operating system type and compilation information in the module will be included in the response header.
# Can be set as one of the column values:
# Full | OS | Minor | Minimal | Major | Prod
# Full conveys the most information, while Prod conveys the least information.
#
ServerTokens Full
#
#Arbitrarily add a line of information including server version and virtual host name to the server-generated output page
# (Internal error document, FTP directory list, mod_status and mod_info output, etc., in addition to CGI errors
# or custom error documentation).
# Setting "EMail" will contain a mailto: connection to ServerAdmin.
# can be the following values: On | Off | EMail
#
ServerSignature On
#
# Aliases: Add the alias you need at this time, the format is as follows:
# Alias Aliases Real Name
#
# Note that if you include "/" at the end of the alias, you also need to include "/" in the URL.
# So, "/icons" is not an alias in this example.
# If the alias ends with "/", then the real name must also end with "/",
# If the ending "/" is omitted from the alias, the real name must also be omitted.
#
# We use the alias "/icons/" to represent the FancyIndexed directory list. If you do not use it,
# FancyIndexing, you can comment out it.
#
# Alias /icons/ "/usr/local/apache2/icons/"
# <Directory "/usr/local/apache2/icons">
# Options Indexes MultiViews
# AllowOverride None
# Order allow,deny
## Allow from all
# </Directory>
#
# This will change ServerRoot/manual. This alias provides the location of the man page,
# Even if you change your DocumentRoot. If you don't care about whether there is a man page or not,
# You can comment out it.
#
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 scripts.
# ScriptAliases Essentially, it is the same as Aliases, except that the documents here are processed as programs when requested.
# The "/" rule at the tail is the same as Alias
#
ScriptAlias /cgi-bin/ "/usr/loacl/apache2/cgi-bin/"
# Here is the command to add php 4 support
AddType application/x-httpd-php .php
LoadModule php4_module modules/
<IfModule mod_cgid.c>
#
# Add mod_cgid.c setting, mod_cgid provides UNIX sockets that use cgid for communication
# Script interface path.
#
# Scriptsock logs/cgisock
</IfModule>
#
# Change "/usr/local/apache2/cgi-bin" to the CGI directory specified by your ScriptAliased,
# If you have configured it.
#
<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#
# Redirect allows you to tell the client to use documents that exist in the server namespace.
# Instead of now, this helps customers locate documents that have changed their location.
# For example:
# Redirect permanent /foo /bar
#
# Instructions for controlling the display of server-generated directory list
#
#
# IndexOptions: Control the display characteristics of the server-generated directory list.
#
IndexOptions FancyIndexing VersionSort
#
The #AddIcon* directive tells the server how to display image files with different extensions.
# Applicable to FancyIndexed instructions only
#
AddIconByEncoding (CMP,/icons/) x-compress x-gzip
AddIconByType (TXT,/icons/) text/*
AddIconByType (IMG,/icons/) image/*
AddIconByType (SND,/icons/) audio/*
AddIconByType (VID,/icons/) video/*
AddIcon /icons/ .bin .exe
AddIcon /icons/ .hqx
AddIcon /icons/ .tar
AddIcon /icons/ .wrl . .vrml .vrm .iv
AddIcon /icons/ .Z .z .tgz .gz .zip
AddIcon /icons/ .ps .ai .eps
AddIcon /icons/ .html .shtml .htm .pdf
AddIcon /icons/ .txt
AddIcon /icons/ .c
AddIcon /icons/ .pl .py
AddIcon /icons/ .for
AddIcon /icons/ .dvi
AddIcon /icons/ .uu
AddIcon /icons/ .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/ .tex
AddIcon /icons/ core
AddIcon /icons/ ..
AddIcon /icons/ README
AddIcon /icons/ ^^DIRECTORY^^
AddIcon /icons/ ^^BLANKICON^^
#
# DefaultIcon provides processing for files that do not explicitly define icons
#
DefaultIcon /icons/
#
#AddDescription allows you to place a short description after the server-generated index.
# Only valid for the FancyIndexed directive.
# Format: AddDescription "Description" File name
#
# AddDescription "GZIP compressed document" .gz
# AddDescription "tar archive" .tar
# AddDescription "GZIP compressed tar archive" .tgz
#
# ReadmeName specifies the name of the README file that the server looks for by default and adds it to the directory list.
#
# HeaderName specifies the file name of the directory list prefix file
ReadmeName
HeaderName
#
# IndexIgnore specifies a collection of file names that are ignored and not included in the list,
# Supports shell-type wildcard characters.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
#
# AddEncoding allows you to decompress information using (Mosaic/X 2.1+) in information transmission,
# Note: Not all browsers support this option.
# Although the names are similar, the following instructions are different from the FancyIndexing custom instructions above.
#
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
#
# DefaultLanguage and AddLanguage allow you to specify the language of the document.
# This allows you to allow users to browse documents in easy-to-understand languages.
#
# Specify the default language, which means that all packages without the specified language will use that language.
# In most cases, you may not want to set it up unless you are sure that doing so is correct.
# Usually, it is better not to use a certain language than to use the wrong language.
#
# DefaultLanguage nl
#
# Note 1: As a language keyword, the affix cannot be the same - use Polish
# The document of the article (the standard network language code is pl) will want to use "AddLanguage pl .po"
# To avoid ambiguity with the general affixes of perl scripts.
#
# Note 2: The following examples illustrate the two-character abbreviation of the language and its country in some examples.
The two-character abbreviations of # are different, such as the comparison of "Danmark/dk" and "Danmark/da".
#
# Note 3: In the case of “ltz”, we use three-character affixes, which violates the RFC regulations.
# It will be fixed during operation and reference data will be obtained using the RFC1766 standard.
#
# Danish (da) - Dutch (nl) - English (en) - Estonian (et)
# French (fr) - German (de) - Greek-Modern (el)
# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (ko)
# Portugese (pt) - Luxembourgeois* (ltz)
# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
# Russian (ru) - Croatian (hr)
#
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .et
AddLanguage fr .fr
AddLanguage de .de
AddLanguage he .he
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddLanguage pl .po
AddLanguage ko .ko
AddLanguage pt .pt
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pt-br .pt-br
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddLanguage hr .hr
# LanguagePriority allows you to prioritize some languages during the session.
#
# List them in decreasing priorities. We more or less adopt the alphabetical order.
# Arrange them. Maybe you want to change the order.
LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw
#
# ForceLanguagePriority Allows you to MULTIPLE CHOICES(Prefer)[In the case of communication]
# or NOT ACCEPTABLE(Fallback) [There is no acceptable language matching] provides a result page.
#
ForceLanguagePriority Prefer Fallback
#
# Specify the default character set for all pages sent out, which is always a good idea and for your
# The internationalization of web sites has opened the door. Isn’t this exactly what you once wanted? Similarly, specify
# The default character set has some minor damage, such as a standard command using iso-8859-1(latin1)
# page unless otherwise specified, for example you just declare it explicitly.
# There are also some related to javascript and URL syntax that always encourages you to use the default character set
# The browser security reasons.
#
#AddDefaultCharset ISO-8859-1
AddDefaultCharse GB2312
#
# Generally, character sets are used in file extensions. Maybe you want to avoid happening with language extensions
# Collision, unless you do a good test after each change.
# See/assignments/character-sets for character sets
# name list and their respective RFCs.
#
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5
# For Russian, multiple character sets are used (how to use mainly depends on the client):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8 .utf8
# The following character sets are not mapped to a specific standard (iso), but they are in the browser
# is widely supported. Pay attention to those capital letters.
# (It shouldn't, but it's done for compatibility with some browsers)
#
# See/assianments/character-sets for
# Their list. However, the browser supports less.
#
AddCharset GB2312 .gb2312 .gb
AddCharset utf-7 .utf7
AddCharset utf-8 .utf8
AddCharset big5 .big5 .b5
AddCharset EUC-TW .euc-tw
AddCharset EUC-JP .euc-jp
AddCharset EUC-KR .euc-kr
AddCharset shift_jis .sjis
#
#AddType allows you to add or overwrite MIME configured in the file for the specified file type
#
AddType application/x-tar .tgz
AddType image/x-icon .ico
#
# AddHandler allows you to map determined file extensions to "handlers":
# Behavior independent of file type. This can be compiled to the server or added to the Action command
# (see below).
# In order to use CGI scripts outside the specified ScriptAliased directive:
# (To make it available, you also need to add "ExecCGI" in Options.
#
# AddHandler cgi-script .cgi
#
# For files containing their own HTTP headers
#
# AddHandler send-as-is asis
#
# For server-parsed imagemap file:
#
# AddHandler imap-file map
#
# agemap file:
#
#AddHandler imap- File image
#
# For type image transfer resources)
# (This is the default setting to allow Apache's "It Worked" page to be distributed in multiple languages).
#
AddHandler type-map var
#
# Filter allows you to process it before sending it to the client.
#
# In order to analyze the .shtml document containing (SSI) on the server side:
# (To execute this instruction, you also need to add "Includes" to the Options instruction.)
#
# AddType text/html .shtml
# AddOutputFilter INCLUDES .shtml
#
#Action lets you define the script to be executed when a matching media file is called. This will reduce
# Repeated input of URL pathnames for those frequently used CGI scripts.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
#
# There are three styles of configurable error responses:
# 1)plain text 2)local redirects 3) external redirects
#
# Some examples:
# ErrorDocument 500 "The server made a boo boo."
# ErrorDocument 404 /
# ErrorDocument 404 "/cgi-bin/missing_handler.pl"
# ErrorDocument 402 /subscription_info.html
#
#
# Comprehensively apply these instructions, we can create an international error response.
#
# We use Alias to redirect any /error/HTTP_<error>. Reply to
# Our collection of multilingual error messages. Use the correct text instead.
#
# By adding the following lines, you can change the display of these messages without having to change
# HTTP_<error>. File.
#
# Alias /error/include/ "/your/include/path/"
#
# Copy the file under /usr/local/apache2/error/include/ to /your/inclue/path/
# Begin, you can create your own collection of files, even its own on each virtual host.
# No matter how your ServerSignature is set, the default include file will display your
# Apache version number and your ServerName email address
#
# Internationalized error documents require three types of mod_alias, mod_include and mod_negotiation
# module. To activate them, cancel the comment symbols on the following 30 lines
# Alias /error/ "/usr/local/apache2/error/"
#
# <Directory "/usr/local/apache2/error">
# AllowOverride None
# Options IncludesNoExec
# AddOutputFilter Includes html
# AddHandler type-map var
# Order allow,deny
# Allow from all
# LanguagePriority en de es fr it nl sv
# ForceLanguagePriority Prefer Fallback
# </Directory>
#
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.
ErrorDocument 403 /
# ErrorDocument 404 /error/HTTP_NOT_FOUND.
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.
# ErrorDocument 410 /error/HTTP_GONE.
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.
# ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.
#
# The following command changes the standard HTTP response behavior to handle known browser issues.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# The following command closes the redirection of non-GET requests for directories without a tail “/”.
# These commands fix the issue that Microsoft's DAV method cannot correctly handle redirected WEB folders.
# This is how to support DAV file system under Apple and VFS under Gnome.
# Processed.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
#
# Allow you to use the URL: http://servername/server-status to generate via mod_status
# and report server status information. Change. For your own domain name.
#
# <Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .
# </Location>
#
# Allow to use URL: http://servername/server-info to remotely report server configuration information.
# (requires support for mod_info.c). Change "." to your own domain name.
#
# <Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .
# </Location>
#
# Proxy server command, remove the following exercise proxy service available.
#
# <IfModule mod_proxy.c>
# ProxyRequests On
# <Proxy *>
# Order deny,allow
# Deny from all
# Allow from .
# </Proxy>
#
# Install or close the HTTP/1.1 "channel" header processing.
# ("Full" adds server version information, and "Block" removes all output "channel" header information.
# Can be set to one of the following options: Off | On | Full | Block
#
# ProxyVia On
# It is best to install cache for the proxy service and remove the comment symbols in the following lines:
# (No cacheRoot, no buffering)
#
# CacheRoot "/usr/local/apache2/proxy"
# CacheSize 5
# CacheGcInterval 4
# CacheMaxExpire 24
# CacheLastModifiedFactor 01
# CacheDefaultExpire 1
# NoCache
# </IfModule>
# The proxy command ends.
#
#Additional specific module configuration.
#
<IfModule mod_ssl.c>
Include conf/
</IfModule>
## Area 3: Virtual Host
#
#VirtualHost: You can set up virtual host containers to maintain multiple hosts on your hosts
#Domain name/hostname. Most configuration information only uses name-based virtual hosts, so the server
# Don’t worry about the IP address, the following command replaces the virtual host name with *.
#
# Before you try to configure your virtual host, see
# URL:/docs-2.0/vhosts/> for more information.
#
# You can use the command line option "-S" to verify your virtual host configuration.
#
# Use a name-based virtual host.
#
# NameVirtualHost *
#
# Virtual host example:
# Almost all Apache commands can be used in virtual host containers.
# The first virtual host area is a configuration used to respond to requests with unknown service names.
#
# <VirtualHost *>
# ServerAdmin webmaster@
# DocumentRoot /www/docs/
# ServerName
# ErrorLog logs/-error_log
# CustomLog logs/-access_log commom
# </virtualHost>
#
# Configuration file based on NCSA service.
#
#This is the main configuration file of Apache server.
#It contains configuration instructions for the server to affect the server's operation.
#See <URL:/doc-2.0/> for detailed information about these directives
#
#Don't just simply read these command information without understanding it.
#There are just a simple explanation here, and if you don't refer to the online file, you will be warned.
#
#These configuration instructions are divided into the following three parts:
#1. The part that controls the behavior of the entire Apache server (i.e., global environment variables)
#2. Directives that define main or default service parameters, and also provide default setting parameters for all virtual hosts.
#3. Setting parameters of virtual host
#
#Configuration and log file name: If the file name you specify starts with "/" (win32 with "dirver:/"),
#The server will use an absolute path, if the file name does not start with "/", then it will put ServerRoot
The value of # is appended to the file name, for example, for "logs/", if ServerRoot's value is
# is "/usr/local/apache2", then the file should be "/usr/local/apache2/logs/"
#
##Zone 1: Global Environment Parameters
#
#The parameters set here will affect the behavior of the entire Apache server;
#For example, the number of concurrent requests that Apache can handle, etc.
#
#ServerRoot: indicates the root directory where the server saves its configuration, errors, log files, etc.
#
#Notice! If you want to specify it as a location on NFS or other network,
#Please be sure to read the documents related to LockFile (maybe in
#<URL:/docs-2.0/mod/mpm_common.html#lockfile>)。
#This will allow you to solve many problems yourself.
#
#Do not add slashes at the end of the path.
#
ServerRoot "/usr/loacl/apache2"
#
#The lock file for serial access must be saved on the local disk.
#
<IfModule !mpm_winnt.c>
<IfModule !mpm_neware.c>
#LockFile logs/
</IfModule>
</IfModule>
#ScoreBoardFile: The file used to save internal service process information.
#If not specified (default), the scoreboard will be saved in an anonymous shared memory segment,
#And it cannot be used by third-party software.
#If specified, make sure that you cannot use the same scoreboard file with two Apaches,
#This scoreboard file must be saved on the local disk.
#
<IfModule !mpm_netware.c>
<IfModule !>
#ScoreBoardFile logs/apache_runtime_status
<IfModule>
<IfModule>
#
#PidFile: The file that records the server startup process number.
#
<IfModule !mpm_neware.c>
PidFile logs/
</IfModule>
#
#Timeout: Number of timeout seconds before receiving and sending
#
Timeout 300
#
#KeepAlive: Whether to allow solid connections (each connection has multiple requests),
# Set to "Off" to disable.
#
KeepAlive On
#
#MaxKeepAliveRequests: Maximum number of requests allowed during a solid connection,
# Set to 0 means unlimited access.
#We recommend you set it to a larger value to improve performance
MaxKeepAliveRequests 100
#
#KeepAliveTimeout: The number of seconds to receive requests from the same customer on the same connection
#
KeepAliveTimeout 15
##
##Server-Pool size setting (for MPM)
##
# prefork MPM
# StartServers: The number of processes started by the server at startup
#MinSpareServers: The minimum number of retained backup processes
# MaxSpareServers: The maximum number of retained backup processes
# MaxClients: The maximum number of processes allowed to start by the server
# MaxRequestsPerChild: The maximum number of requests allowed by a service process
<IfModule >
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestPerChild 0
</IfModule>
# worker MPM
# StartServers: Number of service processes when the server starts
# MaxClients: The maximum number of users allowed to connect simultaneously
#MinSpareThreads: The minimum number of worker threads maintained
# MaxSpareThreads: The maximum number of worker threads allowed
# ThreadsPerChild: Working thread constants in each service process
# MaxRequestsPerChild: The maximum number of requests allowed in the service process
<IfModule >
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
# perchild MPM
# NumServers: Number of service processes
# StartThreads: The number of starting threads in each service process
#MinSpareThreads: The minimum number of threads retained
#MaxSpareThreads: The maximum number of threads retained
# MaxThreadsPerChild: The maximum number of threads allowed per service process
# MaxRequestsPerChild: The maximum number of connections allowed per service process
<IfModule >
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>
# WinNT MPM
# ThreadsPerChild: Working thread constants 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 (one thread is equal to one user)
# MaxRequestsPerThread: The maximum number of requests allowed per thread
<IfModule >
StartThreads 10
MaxClients 50
MaxRequestsPerThread 10000
</IfModule>
# NetWare MPM
# ThreadStachSize: The stack size allocated to each worker thread
# StartThreads: The number of threads started when the server starts
#MinSpareThreads: The number of free threads used to handle actual requests
#MaxSpareThreads: Maximum number of idle threads
# MaxThreads: Maximum number of threads active at the same time
# MaxRequestPerChild: The maximum number of requests for a thread service,
# It is recommended to set it to 0 for unlimited access
<IfModule mpm_netware.c>
ThreadStackSize 65536
StartThreads 250
MinSpareThreads 25
MaxSpareThreads 250
MaxThreads 1000
MaxRequestPerChild 0
</IfModule>
# OS/2 MPM
# StartServers: Number of service processes started
#MinSpareThreads: The minimum free thread allowed by each process
#MaxSpareThreads: Maximum free thread allowed per process
# MaxRequestsPerChild: The maximum number of connections allowed by each service process
<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 the <VirtualHost> command
# Use the following command to make Apache listen only 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,
# So, these instructions are included here so that they can be activated before using it.
# Those statically compiled modules do not need to be listed here (i.e. modules listed with "httpd-l")
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
#
# ExtendedStatus: When "server-status" is called, control Apache generates a "full" state.
# Information (ExtendedStatus On) or generate basic information (ExtendedStatus Off).
# Default is off
#
# ExtendedStatus On
### District 2: "Main" service configuration
#
# This area creates instruction values used by the "main" server in response to those not being "VirtualHost>
# Define any requests processed.
# These values also provide default values to the <VirtualHost> container defined later.
# If there is a definition in <VirtualHost>, the instruction value defined here will be
# covered by the definition in <VirtualHost>.
#
<IfModule !mpm_winnt.c>
<IfModule !mpm_neware.c>
#
# If you want httpd to run as another user or group, you must start as root at the beginning
# And then switch it to the user or group you want to use.
#
# User/Group: Users and groups running httpd
# 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 that some cores refuse setgid(Group) or semctl(IPC_SET) when the group ID is greater than 60000,
Section # 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 a problem occurs.
# As an error document, this address is displayed on the server-generated page,
# For example: admin@
#
ServerAdmin kreny@
#
# ServerName specifies the name and port number used by Apache to identify itself.
# Usually this value is automatically specified, but we recommend that you specify it explicitly to prevent errors during startup.
#
# If you specify an invalid DNS name for your host, the server-generated redirect will not work.
# See the UseCanonicalName command
#
# If your host does not have a DNS name registered, type its IP address here
# Anyway, you have to use its IP address to provide the service,
# There is an easy-to-understand method for redirecting services here
ServerName :80
#
# UseCanonicalName: Directives that determine how Apache constructs URLS and SERVER_NAME and SERVER_PORT.
# When set to "Off", Apache will use the host name and port number provided by the user.
# When set to "On", Apache will use the value of the ServerName directive.
#
UseCanonicalName Off
#
#DocumentRoot: The root directory of your document. By default, all requests are answered from this directory.
# But you can use symbolic links and alias to point to other locations.
#
DocumentRoot "/home/redhat/public_html"
#
# Each directory that can be accessed by Apache can be configured with access permissions (including its subdirectories).
#
# First, we configure a high-limited feature.
# This will prohibit access to the directory where the file system resides and add the directory blocks you wish to allow access.
# See below
<Directory />
Order Deny,Allow
Deny from all
</Directory>
#
# Note from here you must clearly allow what special features to be used.
# - So, if Apache doesn't work as you expect,
# Please check if you explicitly specify that it is available below.
#
#
# This will change to the DocumentRoot you set
#
<Directory "/home/redhat/public_html">
#
# Options: The value of this directive can be "None", "All", or any combination of the following options:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be specified explicitly, and “Options All” cannot provide you with this feature.
#
# This instruction is both complex and important, please see
#"/docs-2.0/mod...??? information.
#
Options FollowSymLinks
#
# AllowOverride controls instructions placed in the .htaccess file.
# It can be "All", "None", or a combination of the following instructions:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Control who can get services.
#
Order allow,deny
Allow from all
</Directory>
#
# UserDir: Specifies the directory name that will be added to the user's home directory when a ~user request is obtained.
#
UserDir public_html
# To prevent vulnerabilities in the UserDir directive, set up for root users
# UserDir like "./" is very useful.
# If you use Apache 1.3 or above, we strongly recommend you
# Include the following line in your server configuration file
UserDir disabled root
#
# The following is an example of using the UserDir directive to make a site's directory have read-only properties:
#
# <Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit Indexes
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludeNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
# </Directory>
#
#DirectoryIndex: Define the file name of the service when the request is a directory.
#
# File (a type image file) is used to provide a document processing list,
# The MultiViews option can also be used for the same purpose, but it will be very slow.
#
DirectoryIndex
#
# AccessFileName: Query the file name of the file that provides additional configuration instructions to the directory in each directory.
# See the AllowOverride instruction.
#
AccessFileName .htaccess
#
# The following line prevents .htaccess and .htpasswd files from being viewed by web customers.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
#
#Typeconfig: Define where to query files.
#
TypeConfig conf/
#
# DefaultType: Defines the default MIME type provided by the server when the MIME type cannot be determined.
# If your service mainly contains text or HTML documents, "text/plain" is a good choice;
# If most of them are binary documents, such as software or images, you should use
# "application/octer-stream" to prevent the browser from displaying binary files like text.
#
DefaultType text/plain
#
# mod_mime_magic allows the server to use different clues (hints) from files that define their own type,
# This MIMEMagicFile directive defines the file where the hints defines it.
#
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
#
# HostnameLookups: Specify the name or IP address of the recorder. For example, when this command is on
# Record the host name, such as; Record the IP address when off, 204.62.129.132.
# The default value is off, which is much better than setting it to on, because if set to on, each user request will
# Create at least one query to the nameserver.
#
HostnameLookups Off
#
# EnableMMAP: Controls whether to perform memory dumps (if the operating system supports it).
# The default is on, if your server is installed on the network file system (NFS), please turn it off.
# On some systems, turning it off will improve system performance (not related to file system type);
# For details, please refer to /docs-2.0/mod...tml#enablemmap
#
# EnableMMAP off
#
# EnableSendfile: Controls whether to use sendfile kernel to support sending files
# (if the operating system supports it). Default is on, if your server is installed on the network file system
# (NFS), please close it.
# See/docs-2.0/mod...enablesendfile
#
# EnableSendfile off
#
# ErrorLog: Error log file location.
# If you do not define the ErrorLog directive in <VirtualHost>, the error message of this virtual host
# will be recorded here. If you define ErrorLog there, these error messages will be recorded in your
# In the file defined, not the file defined here.
#
ErrorLog logs/error_log
#
#LogLevel: Controls the amount of log information recorded in the error log file.
# Possible values include: debug, info, notice, warn, error, crit, alert, emergency.
#
LogLevel warn
#
# The following directive defines the format alias for the CustomLog directive.
#
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 location and format of the access log file (general log format).
# If you do not define this command in <VirtualHost>, the transmission information will be recorded here.
# If you define this directive, it is recorded at the location you specified, not the location defined here.
#
CustomLog logs/access_log common
#
# If you want to record 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 instruction as follows:
#
# CustomLog logs/access_log combined
#
# ServerTokens
# This directive defines the type of information contained in the HTTP response header. Default is "Full",
# This means that the operating system type and compilation information in the module will be included in the response header.
# Can be set as one of the column values:
# Full | OS | Minor | Minimal | Major | Prod
# Full conveys the most information, while Prod conveys the least information.
#
ServerTokens Full
#
#Arbitrarily add a line of information including server version and virtual host name to the server-generated output page
# (Internal error document, FTP directory list, mod_status and mod_info output, etc., in addition to CGI errors
# or custom error documentation).
# Setting "EMail" will contain a mailto: connection to ServerAdmin.
# can be the following values: On | Off | EMail
#
ServerSignature On
#
# Aliases: Add the alias you need at this time, the format is as follows:
# Alias Aliases Real Name
#
# Note that if you include "/" at the end of the alias, you also need to include "/" in the URL.
# So, "/icons" is not an alias in this example.
# If the alias ends with "/", then the real name must also end with "/",
# If the ending "/" is omitted from the alias, the real name must also be omitted.
#
# We use the alias "/icons/" to represent the FancyIndexed directory list. If you do not use it,
# FancyIndexing, you can comment out it.
#
# Alias /icons/ "/usr/local/apache2/icons/"
# <Directory "/usr/local/apache2/icons">
# Options Indexes MultiViews
# AllowOverride None
# Order allow,deny
## Allow from all
# </Directory>
#
# This will change ServerRoot/manual. This alias provides the location of the man page,
# Even if you change your DocumentRoot. If you don't care about whether there is a man page or not,
# You can comment out it.
#
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 scripts.
# ScriptAliases Essentially, it is the same as Aliases, except that the documents here are processed as programs when requested.
# The "/" rule at the tail is the same as Alias
#
ScriptAlias /cgi-bin/ "/usr/loacl/apache2/cgi-bin/"
# Here is the command to add php 4 support
AddType application/x-httpd-php .php
LoadModule php4_module modules/
<IfModule mod_cgid.c>
#
# Add mod_cgid.c setting, mod_cgid provides UNIX sockets that use cgid for communication
# Script interface path.
#
# Scriptsock logs/cgisock
</IfModule>
#
# Change "/usr/local/apache2/cgi-bin" to the CGI directory specified by your ScriptAliased,
# If you have configured it.
#
<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#
# Redirect allows you to tell the client to use documents that exist in the server namespace.
# Instead of now, this helps customers locate documents that have changed their location.
# For example:
# Redirect permanent /foo /bar
#
# Instructions for controlling the display of server-generated directory list
#
#
# IndexOptions: Control the display characteristics of the server-generated directory list.
#
IndexOptions FancyIndexing VersionSort
#
The #AddIcon* directive tells the server how to display image files with different extensions.
# Applicable to FancyIndexed instructions only
#
AddIconByEncoding (CMP,/icons/) x-compress x-gzip
AddIconByType (TXT,/icons/) text/*
AddIconByType (IMG,/icons/) image/*
AddIconByType (SND,/icons/) audio/*
AddIconByType (VID,/icons/) video/*
AddIcon /icons/ .bin .exe
AddIcon /icons/ .hqx
AddIcon /icons/ .tar
AddIcon /icons/ .wrl . .vrml .vrm .iv
AddIcon /icons/ .Z .z .tgz .gz .zip
AddIcon /icons/ .ps .ai .eps
AddIcon /icons/ .html .shtml .htm .pdf
AddIcon /icons/ .txt
AddIcon /icons/ .c
AddIcon /icons/ .pl .py
AddIcon /icons/ .for
AddIcon /icons/ .dvi
AddIcon /icons/ .uu
AddIcon /icons/ .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/ .tex
AddIcon /icons/ core
AddIcon /icons/ ..
AddIcon /icons/ README
AddIcon /icons/ ^^DIRECTORY^^
AddIcon /icons/ ^^BLANKICON^^
#
# DefaultIcon provides processing for files that do not explicitly define icons
#
DefaultIcon /icons/
#
#AddDescription allows you to place a short description after the server-generated index.
# Only valid for the FancyIndexed directive.
# Format: AddDescription "Description" File name
#
# AddDescription "GZIP compressed document" .gz
# AddDescription "tar archive" .tar
# AddDescription "GZIP compressed tar archive" .tgz
#
# ReadmeName specifies the name of the README file that the server looks for by default and adds it to the directory list.
#
# HeaderName specifies the file name of the directory list prefix file
ReadmeName
HeaderName
#
# IndexIgnore specifies a collection of file names that are ignored and not included in the list,
# Supports shell-type wildcard characters.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
#
# AddEncoding allows you to decompress information using (Mosaic/X 2.1+) in information transmission,
# Note: Not all browsers support this option.
# Although the names are similar, the following instructions are different from the FancyIndexing custom instructions above.
#
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
#
# DefaultLanguage and AddLanguage allow you to specify the language of the document.
# This allows you to allow users to browse documents in easy-to-understand languages.
#
# Specify the default language, which means that all packages without the specified language will use that language.
# In most cases, you may not want to set it up unless you are sure that doing so is correct.
# Usually, it is better not to use a certain language than to use the wrong language.
#
# DefaultLanguage nl
#
# Note 1: As a language keyword, the affix cannot be the same - use Polish
# The document of the article (the standard network language code is pl) will want to use "AddLanguage pl .po"
# To avoid ambiguity with the general affixes of perl scripts.
#
# Note 2: The following examples illustrate the two-character abbreviation of the language and its country in some examples.
The two-character abbreviations of # are different, such as the comparison of "Danmark/dk" and "Danmark/da".
#
# Note 3: In the case of “ltz”, we use three-character affixes, which violates the RFC regulations.
# It will be fixed during operation and reference data will be obtained using the RFC1766 standard.
#
# Danish (da) - Dutch (nl) - English (en) - Estonian (et)
# French (fr) - German (de) - Greek-Modern (el)
# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (ko)
# Portugese (pt) - Luxembourgeois* (ltz)
# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
# Russian (ru) - Croatian (hr)
#
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .et
AddLanguage fr .fr
AddLanguage de .de
AddLanguage he .he
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddLanguage pl .po
AddLanguage ko .ko
AddLanguage pt .pt
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pt-br .pt-br
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddLanguage hr .hr
# LanguagePriority allows you to prioritize some languages during the session.
#
# List them in decreasing priorities. We more or less adopt the alphabetical order.
# Arrange them. Maybe you want to change the order.
LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw
#
# ForceLanguagePriority Allows you to MULTIPLE CHOICES(Prefer)[In the case of communication]
# or NOT ACCEPTABLE(Fallback) [There is no acceptable language matching] provides a result page.
#
ForceLanguagePriority Prefer Fallback
#
# Specify the default character set for all pages sent out, which is always a good idea and for your
# The internationalization of web sites has opened the door. Isn’t this exactly what you once wanted? Similarly, specify
# The default character set has some minor damage, such as a standard command using iso-8859-1(latin1)
# page unless otherwise specified, for example you just declare it explicitly.
# There are also some related to javascript and URL syntax that always encourages you to use the default character set
# The browser security reasons.
#
#AddDefaultCharset ISO-8859-1
AddDefaultCharse GB2312
#
# Generally, character sets are used in file extensions. Maybe you want to avoid happening with language extensions
# Collision, unless you do a good test after each change.
# See/assignments/character-sets for character sets
# name list and their respective RFCs.
#
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5
# For Russian, multiple character sets are used (how to use mainly depends on the client):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8 .utf8
# The following character sets are not mapped to a specific standard (iso), but they are in the browser
# is widely supported. Pay attention to those capital letters.
# (It shouldn't, but it's done for compatibility with some browsers)
#
# See/assianments/character-sets for
# Their list. However, the browser supports less.
#
AddCharset GB2312 .gb2312 .gb
AddCharset utf-7 .utf7
AddCharset utf-8 .utf8
AddCharset big5 .big5 .b5
AddCharset EUC-TW .euc-tw
AddCharset EUC-JP .euc-jp
AddCharset EUC-KR .euc-kr
AddCharset shift_jis .sjis
#
#AddType allows you to add or overwrite MIME configured in the file for the specified file type
#
AddType application/x-tar .tgz
AddType image/x-icon .ico
#
# AddHandler allows you to map determined file extensions to "handlers":
# Behavior independent of file type. This can be compiled to the server or added to the Action command
# (see below).
# In order to use CGI scripts outside the specified ScriptAliased directive:
# (To make it available, you also need to add "ExecCGI" in Options.
#
# AddHandler cgi-script .cgi
#
# For files containing their own HTTP headers
#
# AddHandler send-as-is asis
#
# For server-parsed imagemap file:
#
# AddHandler imap-file map
#
# agemap file:
#
#AddHandler imap- File image
#
# For type image transfer resources)
# (This is the default setting to allow Apache's "It Worked" page to be distributed in multiple languages).
#
AddHandler type-map var
#
# Filter allows you to process it before sending it to the client.
#
# In order to analyze the .shtml document containing (SSI) on the server side:
# (To execute this instruction, you also need to add "Includes" to the Options instruction.)
#
# AddType text/html .shtml
# AddOutputFilter INCLUDES .shtml
#
#Action lets you define the script to be executed when a matching media file is called. This will reduce
# Repeated input of URL pathnames for those frequently used CGI scripts.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
#
# There are three styles of configurable error responses:
# 1)plain text 2)local redirects 3) external redirects
#
# Some examples:
# ErrorDocument 500 "The server made a boo boo."
# ErrorDocument 404 /
# ErrorDocument 404 "/cgi-bin/missing_handler.pl"
# ErrorDocument 402 /subscription_info.html
#
#
# Comprehensively apply these instructions, we can create an international error response.
#
# We use Alias to redirect any /error/HTTP_<error>. Reply to
# Our collection of multilingual error messages. Use the correct text instead.
#
# By adding the following lines, you can change the display of these messages without having to change
# HTTP_<error>. File.
#
# Alias /error/include/ "/your/include/path/"
#
# Copy the file under /usr/local/apache2/error/include/ to /your/inclue/path/
# Begin, you can create your own collection of files, even its own on each virtual host.
# No matter how your ServerSignature is set, the default include file will display your
# Apache version number and your ServerName email address
#
# Internationalized error documents require three types of mod_alias, mod_include and mod_negotiation
# module. To activate them, cancel the comment symbols on the following 30 lines
# Alias /error/ "/usr/local/apache2/error/"
#
# <Directory "/usr/local/apache2/error">
# AllowOverride None
# Options IncludesNoExec
# AddOutputFilter Includes html
# AddHandler type-map var
# Order allow,deny
# Allow from all
# LanguagePriority en de es fr it nl sv
# ForceLanguagePriority Prefer Fallback
# </Directory>
#
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.
ErrorDocument 403 /
# ErrorDocument 404 /error/HTTP_NOT_FOUND.
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.
# ErrorDocument 410 /error/HTTP_GONE.
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.
# ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.
#
# The following command changes the standard HTTP response behavior to handle known browser issues.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# The following command closes the redirection of non-GET requests for directories without a tail “/”.
# These commands fix the issue that Microsoft's DAV method cannot correctly handle redirected WEB folders.
# This is how to support DAV file system under Apple and VFS under Gnome.
# Processed.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
#
# Allow you to use the URL: http://servername/server-status to generate via mod_status
# and report server status information. Change. For your own domain name.
#
# <Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .
# </Location>
#
# Allow to use URL: http://servername/server-info to remotely report server configuration information.
# (requires support for mod_info.c). Change "." to your own domain name.
#
# <Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .
# </Location>
#
# Proxy server command, remove the following exercise proxy service available.
#
# <IfModule mod_proxy.c>
# ProxyRequests On
# <Proxy *>
# Order deny,allow
# Deny from all
# Allow from .
# </Proxy>
#
# Install or close the HTTP/1.1 "channel" header processing.
# ("Full" adds server version information, and "Block" removes all output "channel" header information.
# Can be set to one of the following options: Off | On | Full | Block
#
# ProxyVia On
# It is best to install cache for the proxy service and remove the comment symbols in the following lines:
# (No cacheRoot, no buffering)
#
# CacheRoot "/usr/local/apache2/proxy"
# CacheSize 5
# CacheGcInterval 4
# CacheMaxExpire 24
# CacheLastModifiedFactor 01
# CacheDefaultExpire 1
# NoCache
# </IfModule>
# The proxy command ends.
#
#Additional specific module configuration.
#
<IfModule mod_ssl.c>
Include conf/
</IfModule>
## Area 3: Virtual Host
#
#VirtualHost: You can set up virtual host containers to maintain multiple hosts on your hosts
#Domain name/hostname. Most configuration information only uses name-based virtual hosts, so the server
# Don’t worry about the IP address, the following command replaces the virtual host name with *.
#
# Before you try to configure your virtual host, see
# URL:/docs-2.0/vhosts/> for more information.
#
# You can use the command line option "-S" to verify your virtual host configuration.
#
# Use a name-based virtual host.
#
# NameVirtualHost *
#
# Virtual host example:
# Almost all Apache commands can be used in virtual host containers.
# The first virtual host area is a configuration used to respond to requests with unknown service names.
#
# <VirtualHost *>
# ServerAdmin webmaster@
# DocumentRoot /www/docs/
# ServerName
# ErrorLog logs/-error_log
# CustomLog logs/-access_log commom
# </virtualHost>