Apache Server Master configuration file httpd.conf detailed _linux

Source: Internet
Author: User
Tags aliases perl script

#
# Apache Server master configuration file. Includes directory settings for server directives.
# More details <URL:http://www.apache.org/docs/>
#
# Please read the instructions on the basis of understanding the use.
#
# After reading this document, the server will continue the search run
# E:/program Files/apache group/apache/conf/srm.conf
# E:/program Files/apache group/apache/conf/access.conf
# unless the logo is covered with resourceconfig or AccessConfig.
#
# The configuration ID consists of three basic parts:
# 1. As a whole to control the identity of the Apache server process (the ' Global Environment ').
# 2. The identity used to define the primary (default) server parameter.
# Respond to requests that the virtual host cannot handle.
# also provides setting values for all virtual hosts.
# 3. The settings for the virtual host. Configure different IP addresses and host names in an Apache server process.
#
# Configuration and log file name: When specifying server control file naming,
# starting with '/' (or ' drive:/' for Win32), the server will use these absolute paths.
# if the filename does not start with '/', consider the server root in advance--
# so "Logs/foo.log", if the server root directory is "/usr/local/apache",
# The server will be interpreted as '/usr/local/apache/logs/foo.log '.
#
# Note: The specified filename requires '/' instead of ' \ '.
# (for example, "C:/apache" instead of "C:\apache").
# If the drive name is omitted, the drive letter with Apache.exe is used by default
# We recommend that you specify the letter to avoid confusion.
#

### Part 1: Global environment
#
# The representation of this section will affect all Apache operations
# For example, the number of concurrent requests or configuration file addresses that can be processed
#

#
# ServerType desirable value inetd or standalone. INETD only applies to UNIX platforms
#
ServerType Standalone

#


# ServerRoot: The root node of the directory tree. Server configuration, error messages, log files are stored in the root directory.


#


# do not add "/" to the end of the catalogue


#


ServerRoot "C:/Program Files/apache group/apache"





#


# Pidfile: A file that the server uses to record the process ID at startup.


#


Pidfile Logs/httpd.pid





#


# Scoreboardfile: A file that is used to hold information about internal server processes.


# is not necessary. But if specified (this file is generated when Apache is run)


# then you must make sure that no two Apache processes share the same scoreboard file.


#


Scoreboardfile Logs/apache_runtime_status





#


# under Standard configuration, the server reads httpd.conf sequentially (this file can be specified by the-f parameter on the command line).


# srm.conf and access.conf.


# The current two files are empty. For simplicity, it is recommended that all identities be placed in one file.


# The identification of the following two annotations is the default setting.


# to allow the server to ignore these files can be "/dev/null" (for Unix)


# or ' nul ' (for Win32) as an argument.


#


#ResourceConfig conf/srm.conf


#AccessConfig conf/access.conf





#


# Timeout: Time to receive and send Timeout


#


Timeout 300





#


# KeepAlive: Allow connections to be kept (multiple requests per connection)


# "Off"-invalid


#


KeepAlive on





#


# maxkeepaliverequests: The maximum number of requests per connection.


# set to 0 means no limit


# It is recommended that you set higher values for the best performance.


#


Maxkeepaliverequests 100





#


# KeepAliveTimeout: The wait time between two requests for the same connection to the same client.


#


KeepAliveTimeout 15





#


# under Win32, Apache produces one subprocess at a time to process the request.


# If this process dies, another subprocess is automatically generated.


# all incoming requests are multithreaded in the subprocess.


# The following two identities control the running of the process


#





#


# Maxrequestsperchild: Maximum number of requests before each child process dies


# If the number of this request is exceeded, the subroutine automatically exits, avoiding delayed use resulting in a memory overflow or other problem.


# Most systems do not need this setting,


# but parts, like Solaris, are really noteworthy.


# to Win32, can be set to 0 (unrestricted)


# unless there are other considerations.


#


# Note: This value does not include the "keptalive" request after each connection initialization request


# For example, if a subprocess processes an initialization request and 10 subsequent "keptalive" requests,


# under this limit, only one request is recorded.


#


Maxrequestsperchild 0





#


# Threadsperchild: Number of concurrent threads allowed by the server.


# The setting of this value depends on the responsiveness of the server (approximately multiple requests are activated at the same time, the slower the processing time for each request)


# and the system resources that the server is allowed to consume.


#


Threadsperchild 50





#


# Listen: Allows Apache to be bound to the specified IP address and port as a secondary option for the default value.


# See &lt;VirtualHost&gt;


#


#Listen 3000


#Listen 12.34.56.78:80





#


# bindaddress: This option enables virtual hosts.


# This identity is used to tell the server which IP address to listen to.


# includes: ' * ', IP address, or domain name.


# See &lt;VirtualHost&gt; and Listen directives.


#


Bindaddress 166.111.178.144





#


# The Apache module is compiled into a standard Windows architecture.


#


# The following modules are bound to the standard Apache binary Windows distribution.


# to modify the standard operation, uncomment the following line and modify the list of specified modules.


#


# Warning: This is an advanced option. May cause the server to crash.


# without expert guidance, don't change it easily.


#


#ClearModuleList


#AddModule mod_so.c mod_mime.c mod_access.c mod_auth.c mod_negotiation.c


#AddModule mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_userdir.c


#AddModule mod_alias.c mod_env.c mod_log_config.c mod_asis.c mod_imap.c


#AddModule mod_actions.c MOD_SETENVIF.C MOD_ISAPI.C





#


# Dynamic Shared Object (OBJECT,DSO)


#


# to use the Function module based on DSO, you need to replace the corresponding


# ' LoadModule ' line. These included identities will take effect before they are used.


# For more information about DSO, please see the Apache1.3 version of the Readme.dsoso.


# run "Apche-l" to display a list of Apache Mole modules (similar standard connections already in effect)


#


# Note: The order in which the modules are loaded is important. Do not modify the following order without expert advice.


#


#LoadModule Anon_auth_module Modules/apachemoduleauthanon.dll


#LoadModule Dbm_auth_module Modules/apachemoduleauthdbm.dll


#LoadModule Digest_auth_module Modules/apachemoduleauthdigest.dll


#LoadModule Cern_meta_module Modules/apachemodulecernmeta.dll


#LoadModule Digest_module Modules/apachemoduledigest.dll


#LoadModule Expires_module Modules/apachemoduleexpires.dll


#LoadModule Headers_module Modules/apachemoduleheaders.dll


#LoadModule Proxy_module Modules/apachemoduleproxy.dll


#LoadModule Rewrite_module Modules/apachemodulerewrite.dll


#LoadModule Speling_module Modules/apachemodulespeling.dll


#LoadModule Info_module Modules/apachemoduleinfo.dll


#LoadModule Status_module Modules/apachemodulestatus.dll


#LoadModule Usertrack_module Modules/apachemoduleusertrack.dll





#


# Extendedstatus control when a server state handle is called is a "complete" state information (Extendedstatus on)


# or simply return the basic information (extendedstatus off)


# default is: Off


#


#ExtendedStatus on





### Part 2: Master server Configuration


#


# The identity of this section is used for all the setting values of the primary server.


# respond to any requests that are not processed by the &lt;VirtualHost&gt; definition


# These values also give you a default value for the &lt;VirtualHost&gt; that you later define in this file.


#


# All logos may appear in &lt;VirtualHost&gt;.


# The corresponding default values are overwritten by the virtual host redefinition.


#





#


# Port:standalone the port on which the server listens.


# when Apache can listen for the specified port, it needs to be set up in the firewall.


# Other servers running httpd may also affect this port. Disable


# If you are experiencing problems, turn off all firewalls, security, and other services.


# Windos NT's "netstat-a" directive will help analyze the problem.


#


Port 80





#


# ServerAdmin: Your address. If there is any problem with the server will send a letter to this address.


# This address will appear on some pages generated by the server, for example, error reporting.


#


ServerAdmin chenyl98@mails.tsinghua.edu.cn





#


# ServerName allows the host name to be set. If different from the program, the host name returns the client.


# (for example, use "www" instead of the host's real name)


#


# Note: Host name cannot be arbitrarily specified. Must be a valid DNS name for your machine. Otherwise, it will not work properly.


# If you can't understand, be inclined to ask your network administrator.


# If your host does not have a DNS name registered, you can enter an IP address here.


# This must be accessed by IP address. (e.g., http://123.45.67.89/)


# This can be done to redirect the work.


#


# 127.0.0.1 is the local loop address for TCP/IP, usually named localhost.


# The machine defaults here to itself. If you're using Apache for local testing and development,


# You can use 127.0.0.1 as the server name.


#


#ServerName New.host.name


#


# DocumentRoot: The directory where the service documents are placed.


# in the default state, all requests are based on this directory.


# But direct symbolic joins and aliases can be used to point to other locations.


#


DocumentRoot "D:/www_root"





#


# Apache access to each directory can be set to the associated services and attributes are allowed or (and) disallowed.


# (also affects its subdirectories)


#


# First, set the "default" address with only the most basic permissions.


#


&lt;directory/&gt;


Options FollowSymLinks


AllowOverride None


&lt;/Directory&gt;





#


# Note that you must set up special permissions from now on.


# This will not produce unexpected results.


# Please confirm it carefully.


#





#


# This address should be consistent with DocumentRoot


#


&lt;directory "D:/www_root" &gt;





#


# This value is: ' None ', ' all ', or the following combination: ' Indexes ',


# "Includes", "FollowSymLinks", "execcgi", or "multiviews".


#


# note ' MultiViews ' must explicitly specify---' Options all ' does not include this attribute.


#


Options Indexes followsymlinks MultiViews





#


# this controls which. htaccess files in the directory can be overwritten.


# Allow value: ' All ' or a combination of the following: ' Options ', ' FileInfo ',


# "Authconfig", "Limit"


#


AllowOverride None





#


# controls which users can obtain data from this server.


#


Order Allow,deny


Allow from all


&lt;/Directory&gt;





#


# Userdir: When requesting ~user, append to the path address of the user's home directory.


#


# under Win32, it is not required to specify a home directory for the user to log in.


# so you can use the following format.


# Detailed Reference Document Userdir


#


&lt;ifmodule mod_userdir.c&gt;


Userdir "F:/homepages/"


&lt;/IfModule&gt;





#


# Control access to the Userdir directory. The following is a example


# The following is an example of a site where permissions are restricted to read-only.


#


#&lt;directory "E:/program files/apache group/apache/users" &gt;


# allowoverride FileInfo authconfig Limit


# Options MultiViews Indexes symlinksifownermatch includesnoexec


# &lt;limit Get POST OPTIONS propfind&gt;


# Order Allow,deny


# Allow from all


# &lt;/Limit&gt;


# &lt;limitexcept Get POST OPTIONS propfind&gt;


# Order Deny,allow


# Deny from all


# &lt;/LimitExcept&gt;


#&lt;/directory&gt;





#


# DirectoryIndex: The default HTML directory index file name.


# Use spaces to separate multiple file names.


#


&lt;ifmodule mod_dir.c&gt;


DirectoryIndex index.html


&lt;/IfModule&gt;





#


# accessfilename: The file name used to control access information in each directory.


#


Accessfilename. htaccess





#


# The following line prevents the client from accessing the. htaccess file.


# because. htaccess files usually contain authorization information,


# Security considerations do not allow access.


# If you want visitors to see the contents of the. htaccess file,


# These lines can be commented.


# If you modify the accessfilename above,


# Please make the appropriate changes here.


#


# at the same time, you will typically save your password with a similar. htpasswd file.


# These files can also be protected.


#


&lt;files ~ "^\.ht" &gt;


Order Allow,deny


Deny from all


&lt;/Files&gt;





#


# Cachenegotiateddocs: By default, Apache sends "Pragma:no-cache" to each document


# This will require the proxy server not to cache this document.


# cancels this property by canceling the following lines, so the proxy server caches the documents.


#


#CacheNegotiatedDocs





#


# Usecanonicalname: (1.3 New) When this setting is on,


# whenever Apache needs to build a self referenced URL (point to the response source server),


# It will use ServerName and port to build a canonical format.


# When this setting is off, Apache will use the client-supplied host name: port


# This will affect both server_name and server_port in the CGI script


#


Usecanonicalname on





#


# Typesconfig Record Media type (mime.types) files or similar places


#


&lt;ifmodule mod_mime.c&gt;


Typesconfig Conf/mime.types


&lt;/IfModule&gt;





#


# DefaultType is the default type of file that the server handles unconfirmed types, such as the extension to date.


# If your server contains text or HTML documents primarily, ' Text/plain ' is a good setting


# If the server contains primarily binary files, such as applications or pictures,


# better set to ' Application/octet-stream ' to prevent browsers from displaying binary files as text.


#


DefaultType Text/plain





#


# The Mod_mime_magic module allows the server to use different identities of the file itself to determine the file type.


# mimemagicfile indicates where the definition of the module file identity is located.


# Mod_mime_magic is not part of the default server.


# (You must use LoadModule to append the DSO section of the ' Global Environment ' section],


# or include the mod_mime_magic part when compiling the server


# included in &lt;IfModule&gt;.


# that is, if the module is part of the server, the Mimemagicfile identity will execute.


#


&lt;ifmodule mod_mime_magic.c&gt;


Mimemagicfile Conf/magic


&lt;/IfModule&gt;





#


# Hostnamelookups: Registers the client's machine name or IP address.


# For example: www.apache.org (ON) or 204.62.129.132 (off).


# The default is off because for the network, it's best to have people consciously set to ON,


# because opening this feature means that each client request will cause at least one lookup request to be sent to the name server


#


Hostnamelookups off





#


# ErrorLog: Address of the Error record file


# If you do not specify Errorlog in &lt;VirtualHost&gt;


# Changes to the virtual host error forestall will be recorded here.


# If you explicitly specify an error record file in &lt;VirtualHost&gt;,


# then the error will be recorded there, not here.


#


ErrorLog Logs/error.log





#


# LogLevel: Controls the number of information recorded in the Error.log.


# Possible values: Debug, info, notice, warn, error, crit,


# Alert, Emerg.


#


LogLevel warn





#


# The following identification defines the format used by the Customlog identity. (see below)


#


Logformat "%h%l%u%t \%r\"%&gt;s%b \ "%{referer}i\" \ "%{user-agent}i\" "combined


Logformat "%h%l%u%t \"%r\ "%&gt;s%b" common


Logformat "%{referer}i-&gt;%u" Referer


Logformat "%{user-agent}i" Agent





#


# access the location and format of the record (the record file format for the function).


# If you do not define a record file in &lt;VirtualHost&gt;,


# those access records will be saved here. Contrariwise, if you *do*


# Conversely, if a record file is specified, the access record is recorded there rather than in the file.


#


Customlog Logs/access.log Common





#


# If you want to use the proxy and reference log files, uncomment the following identities


#


#CustomLog Logs/referer.log Referer


#CustomLog Logs/agent.log Agent





#


# If you want to record access, proxy, reference information (compound record format) in a file


# You can use the following identification


#


#CustomLog Logs/access.log combined





#


# in server-generated pages (such as Error document information, FTP directory listings, and so on, excluding CGI-generated documents)


# Add a server version and virtual host name information.


# set to ' EMail ' will contain mailto:serveradmin connections.


# Optional value: On | Off | EMail


#


Serversignature on





#


# By default, Apache parses all CGI scripts with work lines


# This comment line (the first line of the script) includes ' # ' and '! ' followed by the program path to execute the special script.


# is the Perl.exe in the C:\Program Files\perl directory for Perl scripts.


# The work line is as follows:





#!c:/program Files/perl/perl





# Note that the real work line cannot have indents, it must be the first line of the file.


# Of course, the CGI process must be started with the appropriate scriptalias or EXECCGI option identification.


#


# However, Apache in Windows allows the above UNIX approach, or it can be in the form of a registry.


# The registry executes the file in the same way that you double-click to run it in Windows Explorer.


# This script action can be set in the View menu of Windows Explorer.


# Folder Options, and then view file types. Click on the Edit button.


# Modify the Operation properties. Apache 1.3 will attempt to perform an ' Open ' operation,


# If you fail, you will try the work line


# This property will change in Apache release 2.0.


#


# each mechanism has its own specific security vulnerabilities that can cause others to run programs that you do not want to invoke.


# The best solution is still under discussion.


#


# If this special attribute of Windows takes effect (and the UNIX attribute is invalid)


# Uncomment the following identities.


#


#scriptInterpreterSource Registry


#


# The above identification can be replaced separately in the &lt;Directory&gt; block or. htaccess file.


# You can choose ' Registry ' (Windows behavior) or ' script '


# (Unix behavior) option, overrides the default value of the server.


#





#


# aliases: an unlimited append alias. The format is as follows:


# Alias Name True


#


&lt;ifmodule mod_alias.c&gt;





#


# Note If the alias contains '/', the server makes the request in the current URL.


# so "/icons" cannot be used for aliases


# must use '/icons/'.


#


alias/icons/"C:/Program Files/apache group/apache/icons/"





&lt;directory "C:/Program files/apache group/apache/icons" &gt;


Options Indexes MultiViews


AllowOverride None


Order Allow,deny


Allow from all


&lt;/Directory&gt;





#


# Scriptalias: Controls which directory contains server scripts.


# Scriptalias Essence line and aliases the same. , except that


# The difference is that the document in the real name directory is considered an application.


# is run by the server instead of to the client when the request is made.


# "/" symbol of the same rule


# the same as the alias.


#


scriptalias/cgi-bin/"C:/Program Files/apache group/apache/cgi-bin/"





#


# "C:/Program Files/apache Group/apache/cgi-bin" can be modified to any directory where CGI scripts are placed


#


&lt;directory "C:/Program files/apache group/apache/cgi-bin" &gt;


AllowOverride None


Options None


Order Allow,deny


Allow from all


&lt;/Directory&gt;





&lt;/IfModule&gt;


# alias End





#php脚本说明





scriptalias/php/"d:/php/"


AddType application/x-httpd-php. php


AddType application/x-httpd-php. php3


AddType application/x-httpd-php. phtml


Action application/x-httpd-php "/php/php.exe"





#php脚本说明结束





#


# Redirect allows you to tell a previous document on the client server, but it does not exist now.


# and can tell the client where to look.


# format: Redirect old-url New-url


#





#


# Control the identity of the server directory list display


#


&lt;ifmodule mod_autoindex.c&gt;





#


# fancyindexing identification is using a specific directory search or a standard (standard)


#


Indexoptions fancyindexing





#


# addicon* indicates the icons displayed for different files or extensions.


# These icons are displayed only in a specific retrieval state.


#


Addiconbyencoding (cmp,/icons/compressed.gif) x-compress X-gzip





Addiconbytype (txt,/icons/text.gif) text/*


Addiconbytype (img,/icons/image2.gif) image/*


Addiconbytype (snd,/icons/sound2.gif) audio/*


Addiconbytype (vid,/icons/movie.gif) video/*





Addicon/icons/binary.gif. bin. exe


Addicon/icons/binhex.gif. hqx


Addicon/icons/tar.gif. Tar


Addicon/icons/world2.gif. wrl. wrl.gz. vrml. Vrm. IV


Addicon/icons/compressed.gif. Z. tgz. gz. zip


Addicon/icons/a.gif. ps. ai. eps


Addicon/icons/layout.gif. html. shtml. htm. pdf


Addicon/icons/text.gif. txt


Addicon/icons/c.gif. C


addicon/icons/p.gif. pl. py


Addicon/icons/f.gif. For


Addicon/icons/dvi.gif. DVI


Addicon/icons/uuencoded.gif. UU


Addicon/icons/script.gif. Sh. Shar. csh. Ksh. tcl


Addicon/icons/tex.gif. Tex


Addicon/icons/bomb.gif Core





Addicon/icons/back.gif..


Addicon/icons/hand.right.gif README


Addicon/icons/folder.gif ^^ directory^^


Addicon/icons/blank.gif ^^ blankicon^^





#


# DefaultIcon The icon displayed for the file that made the icon.


#


Defaulticon/icons/unknown.gif





#


# Adddescription Appends a small paragraph description after a server-generated retrieved file.


# This entry is only valid when set to Fancyindexed


# Format: adddescription "description" filename


#


#AddDescription "GZIP Compressed document". GZ


#AddDescription "Tar archive". Tar


#AddDescription "GZIP Compressed Tar archive". tgz





#


# Readmename is the default Readme file for the server.


# and is appended to the end of the directory list.


#


# Headername is the name of the file in the directory that needs to be displayed in advance.


#


# if MultiViews is in the option, as a result, the server will first find name.html,


# If it exists, include it. If name.html does not exist,


# The server will continue to look for name.txt. If present is included as plain text.


#


Readmename README


Headername HEADER





#


# Indexignore is a series of file names. The directory index ignores these files and is not included in the list.


# allows wildcard characters to be used.


#


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





&lt;/IfModule&gt;


# Indexing logo End





#


# file Type


#


&lt;ifmodule mod_mime.c&gt;





#


# addencoding can be used for special browsers (mosaic/x 2.1+) for fast transfer of compressed information.


# Note: Not all servers are supported.


# In addition to similar names, the following add* logos have no effect on the Fancyindexing custom logo above.


#


AddEncoding x-compress Z


AddEncoding X-gzip GZ tgz


#


# AddLanguage is used to specify the language of the document.


# You can use the content label to specify the language of each file.


#


# note 1: The suffix does not have to be the same as the keyword in the language you are using.


#---Polish (Polish, Standard code for PL) documents can be used


# "AddLanguage Pl. po" to avoid confusion with Perl script files.


#


# NOTE 2: The following example shows that the two-letter language abbreviation and the two-letter national abbreviation are not necessarily the same.


# e.g ' DANMARK/DK ' contrasts ' danish/da '.


#


# Note 3: One of the ' Ltz ' uses three characters, which differs from the RFC requirements.


# But this problem is being revised and the RFC1766 is being cleaned up again.


#


# Danish Danish (DA)-Netherlands Dutch (NL)-English 中文版 (en)-Essania Estonian (EE)


# French French (FR)-German German (DE)-Modern Greek Greek-modern (EL)


# Italian Italian (it)-North Korea Korean (KR)-Norwegian Norwegian (no)


# Portuguese Portuguese (PT)-Luxembourg luxembourgeois* (LTZ)


# spanish Spanish (es)-Swedish Swedish (SV)-Catalan Catalan (ca)-Czech Czech (CZ)


# Polish Polish (PL)-Brazilian Brazilian Portuguese (PT-BR)-Japan Japanese (JA)


# Russian Russian (RU)


#


AddLanguage da. DK


AddLanguage NL. nl


AddLanguage en. en


AddLanguage et. ee


AddLanguage Fr. fr


AddLanguage de. de


AddLanguage el. El


AddLanguage He.


Addcharset iso-8859-8. iso8859-8


AddLanguage it. it


AddLanguage ja. Ja


Addcharset ISO-2022-JP. JIS


addlanguage Kr. kr


Addcharset Iso-2022-kr. Iso-kr


AddLanguage No. No


AddLanguage Pl. po


Addcharset iso-8859-2. Iso-pl


AddLanguage Pt. PT


AddLanguage pt-br. pt-br


AddLanguage Ltz. Lu


AddLanguage ca. ca


AddLanguage es. es


AddLanguage sv. SE


AddLanguage CZ. CZ


AddLanguage ru. ru


AddLanguage tw. tw


Addcharset Big5. Big5. Big5


Addcharset WINDOWS-1251. cp-1251


Addcharset CP866. cp866


Addcharset iso-8859-5. Iso-ru


Addcharset koi8-r. Koi8-r


Addcharset UCS-2. ucs2


Addcharset UCS-4. Ucs4


Addcharset UTF-8. UTF8





# languagepriority can set the priority of the language.


#


# Priority Descending order


# Here in alphabetical order, can be modified


#


&lt;ifmodule mod_negotiation.c&gt;


Languagepriority en da nl et fr de el it ja kr no pl pt pt-br RU ltz ca es sv TW


&lt;/IfModule&gt;





#


# AddType can temporarily change mime.types or specify a special file format.


#


# For example: PHP 3.x modules (non-Apache standard accessories, see HTTP://WWW.PHP.NET) can be defined in the following format:


#


#AddType application/x-httpd-php3. php3


#AddType Application/x-httpd-php3-source. Phps


#


# PHP 4.x, using:


#


#AddType application/x-httpd-php. php


#AddType Application/x-httpd-php-source. Phps





AddType Application/x-tar. tgz





#


# AddHandler can map a specific file name extension to a processing method.


# regardless of file type. This attribute can be built into the server or appended to the operation instruction (see below)


#


# If you want to use a server-side application or a CGI outside of scriptaliased, uncomment the following line


#


# with CGI script:


#


#AddHandler Cgi-script. CGI





#


# HTML documents parsed with the server


#


#AddType text/html. shtml


#AddHandler server-parsed. shtml





#


# The Send-asis HTTP file attribute of Apache can be activated by canceling the following annotation characters


#


#AddHandler Send-as-is ASIS





#


# If you use a server-side resolved image location file, use the following identity:


#


#AddHandler imap-file Map





#


# To activate type maps use:


#


#AddHandler type-map var





&lt;/IfModule&gt;


# Document Type description End





#


# Action defines a script that executes when a file matches.


# simplifies calls to common CGI files.


# Format: Action media/type/cgi-script/location


# Format: Action handler-name/cgi-script/location


#





#


# Metadir: Specifies the directory where the meta information file is saved.


# These files contain additional HTTP headers that are sent in the sending document.


#


#MetaDir. Web





#


# Metasuffix: Specifies the suffix of the file that contains meta information.


#


#MetaSuffix. Meta





#


# Customizable Error response (Apache type)


# A total of three styles:


#


# 1) Plain text


#ErrorDocument "The server made a boo boo.


# Note: The first "number" is used to indicate the text, not actually output


#


# 2 Local redirection


#ErrorDocument 404/missing.html


# to redirect to the local url/missing.html


#ErrorDocument 404/cgi-bin/missing_handler.pl


# Note: A script or document that can be redirected to any server-side


#


# 3) External redirection


#ErrorDocument 402 http://some.other_server.com/subscription_info.html


# Note: Most of the environment variables associated with the initial request are not valid for such a script.


#





#


# Custom operations based on the browser


#


&lt;ifmodule mod_setenvif.c&gt;





#


# The following identification modifies the normal HTTP response operation.


# The first identifies the ability to cancel the activation state for netscape2.x and other browsers that do not have this feature


# These browsers can perform these functions with an error.


# The second identity is set for ie4.0b2. There's an incomplete http/1.1 directive.


# cannot remain active while 301 or 302 (redirect) response


#


Browsermatch "MOZILLA/2" nokeepalive


Browsermatch "MSIE 4\.0b2;" Nokeepalive downgrade-1.0 force-response-1.0





#


# The following identity cancels the response to a browser that violates the http/1.0 standard by not generating a basic 1.1 response.


#


Browsermatch "RealPlayer 4\.0" force-response-1.0


Browsermatch "java/1\.0" force-response-1.0


Browsermatch "jdk/1\.0" force-response-1.0





&lt;/IfModule&gt;


# Browser Custom logo End





#


# allows you to view server status reports in the form of URL ' http://servername/server-status '


# modify '. your_domain.com ' to match the corresponding domain name to activate this feature


#


#&lt;location/server-status&gt;


# SetHandler Server-status


# Order Deny,allow


# Deny from all


# Allow from. your_domain.com


#&lt;/location&gt;





#


# Allow URL '://servername/server-info ' to be used (requires loading mod_info.c),


# to view server configuration reports remotely.


# modify '. your_domain.com ' to match the corresponding domain name to activate this feature


#


#&lt;location/server-info&gt;


# SetHandler Server-info


# Order Deny,allow


# Deny from all


# Allow from. your_domain.com


#&lt;/location&gt;





#


# It is reported that someone tried to exploit an old 1.1 loophole.


# This vulnerability is related to the distribution of CGI scripts on the Apache server.


# by canceling the comments on the following lines, you can transfer such an attack record to a record script on phf.apache.org.


# or it can be logged on the local server using the script scriptsupport/phf_abuse_log.cgi.


#


#&lt;location/cgi-bin/phf*&gt;


# Deny from all


# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi


#&lt;/location&gt;





#


# Proxy Server identification. Uncomment the following line to activate the proxy server.


#


#&lt;ifmodule mod_proxy.c&gt;


# proxyrequests on





# &lt;directory Proxy:*&gt;


# Order Deny,allow


# Deny from all


# Allow from. your_domain.com


# &lt;/Directory&gt;





#


# Activate/Cancel processing http/1.1 ' Via: ' Header


# ("full": Join server version; "Block": Cancel all outgoing via: header


# can be set value: Off | On | Full | Block


#


# Proxyvia on





#


# Modify the following lines and uncomment to activate the cache.


# (no cache is not used without cacheroot identity)


#


# cacheroot "E:/program files/apache group/apache/proxy"


# CacheSize 5


# Cachegcinterval 4


# Cachemaxexpire 24


# Cachelastmodifiedfactor 0.1


# cachedefaultexpire 1


# NoCache a_domain.com another_domain.edu joes.garage_sale.com





#&lt;/ifmodule&gt;


# Agent Identity End





### Part 3: Virtual host


#


# Virtual Host: If you want to implement multiple domain names and host name services on a single server,


# can be set VirtualHost to implement. Most configurations


# Most of the settings use a name-based virtual host so that the server does not have to worry about the IP address.


# These are marked with an asterisk in the following logo.


#


# before attempting to set up a virtual host


# Please read the documentation in &lt;URL:http://www.apache.org/docs/vhosts/&gt;.


# to understand the details.


#


# The command line parameter '-s ' can be used to confirm the setting of the virtual host.


#





#


# Use a name-based virtual host


#


#NameVirtualHost *





#


# Virtual Host instance:


# Almost all Apache identities can be used within a virtual host.


# The first virtualhost section is used to request a server name without duplicates.


#


#&lt;virtualhost *&gt;


# ServerAdmin Webmaster@dummy-host.example.com


# documentroot/www/docs/dummy-host.example.com


# ServerName Dummy-host.example.com


# ErrorLog Logs/dummy-host.example.com-error_log


# Customlog Logs/dummy-host.example.com-access_log Common


#&lt;/virtualhost&gt;

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

11.11 Big Sale for Cloud

Get Unbeatable Offers with up to 90% Off,Oct.24-Nov.13 (UTC+8)

Get It Now >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

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

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