httpd Default configuration file

Source: Internet
Author: User

Because of the default configuration file for Apache/etc/httpd/conf/ httpd.conf This file inside the comment information is too much, for the English poor students to read the entire document is really a headache. So I put httpd2.2.15 inside the default configuration file to remove the English comments, I understand to make an annotation hope to see the friends of the novice to help, if there is a mistake welcome to the point Is..

First I take the httpd.conf file to the line that begins with the # number, and enter it into the httpd1.conf file! This gives you a configuration file with no English annotations.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/4E/wKiom1VE__OwFffXAAB8hRuIixE762.jpg "title=" QQ picture 20150503004912.png "alt=" Wkiom1ve__owfffxaab8hruiixe762.jpg "/>

Here's what's in the configuration file:

Servertokens OS: This is used to set the HTTP header to return the version information, with parameters: Pord,major,minor,min,os,full. The more detailed the information that responds from left to right.

ServerRoot "/ETC/HTTPD": Service management directory containing configuration file module information, etc.

Pidfile run/httpd.pid: The file used to specify the PID of the httpd management process, where the path is the relative path of ServerRoot

Timeout 60: Response time-out 60s

KeepAlive OFF: Whether to turn on long connections

Maxkeepaliverequests 100: The maximum number of requested resources for a long connection

KeepAliveTimeout 15: Long connection time-out


<ifmodule prefork.c>: This means that if you use MPM with the Prefork model,
Startservers 8: Number of initial boot processes
Minspareservers 5: Minimum number of idle processes
Maxspareservers 20: Maximum number of idle processes
Serverlimit 256: The maximum number of simultaneous start processes
MaxClients 256: Maximum concurrency supported
Maxrequestsperchild 4000: Maximum number of requests processed by a single process
</IfModule>

<ifmodule worker.c>: If MPM uses the worker model
Startservers 4: Number of initial boot processes
MaxClients 300: Maximum concurrency
Minsparethreads 25: Minimum number of idle threads
Maxsparethreads 75: Maximum number of idle processes
Threadsperchild 25: Maximum number of threads generated by a process
Maxrequestsperchild 0: Because the worker model is a process that produces multiple threads, a single process handles the request poorly qualified
</IfModule>

Listen 80: Default Listener port number

LoadModule auth_basic_module modules/mod_auth_basic.so module loaded by default
LoadModule Auth_digest_module modules/mod_auth_digest.so
LoadModule Authn_file_module modules/mod_authn_file.so
LoadModule Authn_alias_module modules/mod_authn_alias.so
LoadModule Authn_anon_module modules/mod_authn_anon.so
LoadModule Authn_dbm_module modules/mod_authn_dbm.so
LoadModule Authn_default_module modules/mod_authn_default.so
LoadModule Authz_host_module modules/mod_authz_host.so
LoadModule Authz_user_module modules/mod_authz_user.so
LoadModule Authz_owner_module modules/mod_authz_owner.so
LoadModule Authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule Authz_dbm_module modules/mod_authz_dbm.so
LoadModule Authz_default_module modules/mod_authz_default.so
LoadModule Ldap_module modules/mod_ldap.so
LoadModule Authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule Include_module modules/mod_include.so
LoadModule Log_config_module modules/mod_log_config.so
LoadModule Logio_module modules/mod_logio.so
LoadModule Env_module modules/mod_env.so
LoadModule Ext_filter_module modules/mod_ext_filter.so
LoadModule Mime_magic_module modules/mod_mime_magic.so
LoadModule Expires_module modules/mod_expires.so
LoadModule Deflate_module modules/mod_deflate.so
LoadModule Headers_module modules/mod_headers.so
LoadModule Usertrack_module modules/mod_usertrack.so
LoadModule Setenvif_module modules/mod_setenvif.so
LoadModule Mime_module modules/mod_mime.so
LoadModule Dav_module modules/mod_dav.so
LoadModule Status_module modules/mod_status.so
LoadModule Autoindex_module modules/mod_autoindex.so
LoadModule Info_module modules/mod_info.so
LoadModule Dav_fs_module modules/mod_dav_fs.so
LoadModule Vhost_alias_module modules/mod_vhost_alias.so
LoadModule Negotiation_module modules/mod_negotiation.so
LoadModule Dir_module modules/mod_dir.so
LoadModule Actions_module modules/mod_actions.so
LoadModule Speling_module modules/mod_speling.so
LoadModule Userdir_module modules/mod_userdir.so
LoadModule Alias_module modules/mod_alias.so
LoadModule Substitute_module modules/mod_substitute.so
LoadModule Rewrite_module modules/mod_rewrite.so
LoadModule Proxy_module modules/mod_proxy.so
LoadModule Proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule Proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule Proxy_http_module modules/mod_proxy_http.so
LoadModule Proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule Proxy_connect_module modules/mod_proxy_connect.so
LoadModule Cache_module modules/mod_cache.so
LoadModule Suexec_module modules/mod_suexec.so
LoadModule Disk_cache_module modules/mod_disk_cache.so
LoadModule Cgi_module modules/mod_cgi.so
LoadModule Version_module modules/mod_version.so


Include conf.d/*.conf: Find the path to the configuration file, here is the relative path of ServerRoot


User APACHE:HTTPD Process-initiated owner
Group Apache: Owning groups


ServerAdmin [email protected]: admin email address


Usecanonicalname Off: Turn on this feature will use the ServerName set domain name for all self-references, URLs, ServerName, CGI server_port, such as the Web server has its own domain name www.a.com, If you enter the IP address of the Web server in the browser, it will automatically convert the IP to the corresponding domain name www.a.com.

DocumentRoot "/var/www/html": Document Directory

<directory/>
Options followsymlinks: Defines how a Web page document under the DocumentRoot directory is accessed, FollowSymLinks allows access to the file pointed to by the symbolic link (unnecessary should not be allowed, which can affect server execution efficiency)
AllowOverride None
</Directory>


<directory "/var/www/html" >

Options Indexes followsymlinks:indexes Allow index directory (non-download station this feature does not open)

AllowOverride None: Allow overwrite

Order Allow,deny: The access control function used to define the host
Allow from all: Allows all people to access

</Directory>

<ifmodule mod_userdir.c>: A module where users create their own websites in their home directories
Userdir Disabled: Default off


</IfModule>


DirectoryIndex index.html Index.html.var: Defining a default page

Accessfilename. htaccess: Execution permissions for a directory (if defined this will result in inefficient server execution)

<files ~ "^\.ht" >: Define access rules for files beginning with. HT
Order Allow,deny
Deny from all: Prohibit anyone from accessing
Satisfy All
</Files>

Typesconfig/etc/mime.types: Defines the configuration file path for MIME types

DefaultType text/plain: Default type

<ifmodule mod_mime_magic.c>
Mimemagicfile Conf/magic
</IfModule>

Hostnamelookups off: The ability to turn off the user's IP address to host name when logging



Errorlog Logs/error_log: Relative path to error log

LogLevel warn: Defining log levels

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




Customlog logs/access_log Combined: Set path and log level for Customlog

Serversignature on

alias/icons/"/var/www/icons/": Define Path aliases for/icons

<directory "/var/www/icons" >: Defining Access Control rules
Options Indexes multiviews FollowSymLinks
AllowOverride None
Order Allow,deny
Allow from all
</Directory>

<ifmodule mod_dav_fs.c>
Davlockdb/var/lib/dav/lockdb
</IfModule>

scriptalias/cgi-bin/"/var/www/cgi-bin/": Define Path aliases for/cgi-bin/

<directory "/var/www/cgi-bin" >
AllowOverride None
Options None
Order Allow,deny
Allow from all
</Directory>



Indexoptions fancyindexing versionsort namewidth=* HTMLTable charset=utf-8

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. 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. conf. 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/icons/unknown.gif


Readmename README.html:ReadmeName's file name
Headername header.html


AddLanguage ca. CA: Supported languages
AddLanguage CS. cz. CS
AddLanguage da. DK
AddLanguage de. de
AddLanguage el El
AddLanguage en. en
AddLanguage EO. EO
AddLanguage es. es
AddLanguage et et
AddLanguage Fr. fr
AddLanguage He.
AddLanguage hr. HR
AddLanguage it. it
AddLanguage ja. Ja
AddLanguage Ko Ko
AddLanguage Ltz. Ltz
AddLanguage NL NL
AddLanguage nn. nn
AddLanguage No. No
AddLanguage Pl. po
AddLanguage Pt. PT
AddLanguage pt-br. pt-br
AddLanguage ru. ru
AddLanguage sv. sv
AddLanguage ZH-CN. ZH-CN
AddLanguage ZH-TW. zh-tw

Languagepriority en CA cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-br Ru SV ZH-CN ZH-TW

Forcelanguagepriority Prefer Fallback

Adddefaultcharset UTF-8: Specifies that the default character set is UTF-8



AddType application/x-compress. Z: Specify a MIME type for a file of a specific suffix
AddType application/x-gzip. gz. tgz

AddType Application/x-x509-ca-cert. CRT
AddType application/x-pkcs7-crl. CRL



AddHandler type-map var

AddType text/html. shtml
Addoutputfilter includes. shtml




alias/error/"/var/www/error/": Specifying the error alias path

<ifmodule mod_negotiation.c>
<ifmodule mod_include.c>
<directory "/var/www/error" >
AllowOverride None
Options includesnoexec
Addoutputfilter includes HTML
AddHandler type-map var
Order Allow,deny
Allow from all
Languagepriority en es de fr
Forcelanguagepriority Prefer Fallback
</Directory>


</IfModule>
</IfModule>

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

Browsermatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
Browsermatch "MS FrontPage" redirect-carefully
Browsermatch "^webdrive" redirect-carefully
Browsermatch "^WEBDAVFS/1. [0123] "redirect-carefully
Browsermatch "^gnome-vfs/1.0" redirect-carefully
Browsermatch "^xml Spy" redirect-carefully
Browsermatch "^DREAMWEAVER-WEBDAV-SCM1" redirect-carefully

This article is from the "left-handed" blog, make sure to keep this source http://mofeihu.blog.51cto.com/1825994/1641402

httpd Default configuration file

Contact Us

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

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

A Free Trial That Lets You Build Big!

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

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

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