Apache配置文件详解(3)

2019-01-27 16:22

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

#Apache提供了非常多的模块供我们使用,以上就是加载的模块 #

# The following modules are not loaded by default: #

#LoadModule asis_module modules/mod_asis.so

#LoadModule authn_dbd_module modules/mod_authn_dbd.so #LoadModule cern_meta_module modules/mod_cern_meta.so #LoadModule cgid_module modules/mod_cgid.so #LoadModule dbd_module modules/mod_dbd.so #LoadModule dumpio_module modules/mod_dumpio.so #LoadModule filter_module modules/mod_filter.so #LoadModule ident_module modules/mod_ident.so

#LoadModule log_forensic_module modules/mod_log_forensic.so #LoadModule unique_id_module modules/mod_unique_id.so # #

# Load config files from the config directory \#

Include conf.d/*.conf

#因为有这一行的存在,所以所有放置到/etc/httpd/conf.d/*.conf的设置都会被读入 #

# ExtendedStatus controls whether Apache will generate \

# information (ExtendedStatus On) or just basic information (ExtendedStatus # Off) when the \#

#ExtendedStatus On

#这一行配置决定了Apache服务器状态页功能是否打开

#如果打开,可以拿掉这一行的注释,然后在第900行左右的配置区域进行详细配置 #例: #

# If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. #

# User/Group: The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use \

# . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don't use Group #-1 on these systems! #

User apache Group apache

#用来启动Apache的用户和用户组

#这个设置很重要,因为未来你提供的网页文件能不能被浏览都与这个身份有关。

### Section 2: 'Main' server configuration #

# The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for

# any containers you may define later in the file. #

# All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # #

# ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com #

ServerAdmin root@localhost

#系统管理员的邮箱,当网站出现问题的时候,错误信息会显示的联系邮箱 #

# ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. #

# If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive. #

# If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. #

#ServerName www.example.com:80

#设置主机名,这个值如果没有设置的话,默认会以hostname的输出为依据 #千万要记得,填入的这个主机名一定要能找到他对应的IP(DNS或hosts)

#

# UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set \# by the client. When set \# ServerName directive. #

UseCanonicalName Off

#是否使用标准的主机名。如果主机有多个主机名,若这个设置为On, #那么Apache只接受上面servername指定的主机名连接而已。请使用Off。 #

# DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. #

DocumentRoot \

#上面这一行的配置指定了放置首页的目录 #

# Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). #

# First, we configure the \ # features. #

Options FollowSymLinks

AllowOverride None

#Directory指定后面的路径是系统中的绝对路径

#这个设置是针对www服务器的默认环境而来的,因为是针对“/”的设置 #建议保留上面的默认值 #

# Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # #

# This should be changed to whatever you set DocumentRoot to. #

#使用Directory指定了一个绝对路径的目录 #

# Possible values for the Options directive are \# or any combination of:

# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews #

# Note that \# doesn't give it to you. #

# The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information.


Apache配置文件详解(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:机械专业到福田得暑期社会实践报告范文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: