当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

《Linux操作系统》课程教学资源(讲义)第八章 提供Internet服务(8-3)WWW服务器的设置

资源类别:文库,文档格式:DOC,文档页数:22,文件大小:212.5KB,团购合买
在 GNOME 桌面面板选择依次选择【系统】/【管理】/【服务器设置】/【HTTP】。也 可以在终端窗口执行#system-config-httpd 命令。 当配置工具界面(如图 8-23 所示)启动以后,可以遵循以下 8 个步骤进行配置。
点击下载完整版文档(DOC)

8.3. Apache概述 8.32实例一设置 Apache服务器 命实例85使用GU配置 Apache服务器 在 GNOME桌面面板选择依次选择【系统】/【管理】/【服务器设置】/【HTP】。也 可以在终端窗口执行#system-config-httpd命令。 当配置工具界面(如图8-23所示)启动以后,可以遵循以下8个步骤进行配置。 在【主】选项卡中进行基本设置 在【虚拟主机】选项卡中进行默认的设置 在【服务器】选项卡中进行服务器配置 在【性能】选项卡中进行连接等设置 保存设置 将所有必要的文件复制到 DocumentRoot和cgi-bin目录下 启动 Apache 测试 实例8-6认识 Apache服务器的默认配置文件 Apache服务器的配置文件是httpdconf,位于/etc/httpd/con目录下,对Apache服务器 的配置其实就是对httpd.conf文件的修改,希望读者以后能够使用修改配置文件方法进行 Apache服务器的配置,不要局限于GiUI(图形用户界面)的配置操作。 letc/httpd/conf/httpd.conf文件的原始内容如下 ## Section I: global Environment Server Tokens os 当服务器响应主机头信息时显示 Apache的版本和操作系统的名称 ServerRoot"/etc/httpd/设置服务器的根目录 Pidfilerun/httpdpid∥设置运行Apache时使用的PidFile的路径 # Timeout定义客户程序和服务器连接的超时间隔,超过这个时间间隔(秒)后 #服务器将断开与客户机的连接 #建议设置为On,允许使用保持连接功能,这样就可以在一次连接中传递多个HTTP请求 KeepAlive Off #在使用保持连接功能时, MaxKeepAliveRequests为一次连接可以进行的HTP请求的 #最大请求次数。将其值设为0将支持在一次连接内进行无限次的传输请求

8.3.1 Apache 概述 8.3.2 实例—设置 Apache 服务器 实例 8-5 使用 GUI 配置 Apache 服务器 在 GNOME 桌面面板选择依次选择【系统】/【管理】/【服务器设置】/【HTTP】。也 可以在终端窗口执行#system-config-httpd 命令。 当配置工具界面(如图 8-23 所示)启动以后,可以遵循以下 8 个步骤进行配置。 ➢ 在【主】选项卡中进行基本设置 ➢ 在【虚拟主机】选项卡中进行默认的设置 ➢ 在【服务器】选项卡中进行服务器配置 ➢ 在【性能】选项卡中进行连接等设置 ➢ 保存设置 ➢ 将所有必要的文件复制到 DocumentRoot 和 cgi-bin 目录下 ➢ 启动 Apache ➢ 测试 实例 8-6 认识 Apache 服务器的默认配置文件 Apache 服务器的配置文件是 httpd.conf,位于/etc/httpd/conf/目录下,对 Apache 服务器 的配置其实就是对 httpd.conf 文件的修改,希望读者以后能够使用修改配置文件方法进行 Apache 服务器的配置,不要局限于 GUI(图形用户界面)的配置操作。 /etc/httpd/conf/httpd.conf 文件的原始内容如下: ### Section 1: Global Environment ServerTokens OS //当服务器响应主机头信息时显示Apache的版本和操作系统的名称 ServerRoot "/etc/httpd" //设置服务器的根目录 PidFile run/httpd.pid //设置运行Apache时使用的PidFile的路径 #Timeout定义客户程序和服务器连接的超时间隔,超过这个时间间隔(秒)后 #服务器将断开与客户机的连接 Timeout 120 #建议设置为On,允许使用保持连接功能,这样就可以在一次连接中传递多个HTTP请求 KeepAlive Off #在使用保持连接功能时,MaxKeepAliveRequests为一次连接可以进行的HTTP请求的 #最大请求次数。将其值设为0将支持在一次连接内进行无限次的传输请求

#事实上没有客户程序在一次连接中请求太多的页面,通常达不到这个上限就完成连接了 MaxKeepAliveRequests 100 #在使用保持连接功能时, KeepAliveTimeou测试一次连接中的多次请求传输之间的时间 #如果服务器已经完成了一次请求,但一直没有接收到客户程序的下一次请求 #在时间间隔超过了这个参数设置的值之后,服务器就断开连接 Keep Timeout 15 Server- Pool Size Regulation(MPM specific) #设置使用 prefork. mpm运行方式的参数,此运行方式是 Redhat的默认方式 StartServers 8/设置服务器启动时运行的进程数 MinSpareServers5 APache在运行时会根据负载的轻重自动调整空闲子进程的数目,若存在低于5个 ∥空闲子进程,就创建一个新的子进程准备为客户提供服务 MaxSpareServers20l若存在高于20个空闲子进程,就逐一删除子进程来提高系统性能 ServerLimit Maxclients 256/限制同一时间的连接数不能超过256 MaxRequests PerChild4000。/限制每一个子进程在结束处理请求之前能处理的连接请求为400 #设置使用 worker mPm运行方式的参数 2 Maxclients MinSpare Threads MaxSpare Threads Threads PerChild 25 MaxRequests PerChild 0 #设置服务器的监听端口号 # Listen1234.56.78:80 Listen 80 #动态加载模块(DSO) Dynamic Shared Object(DsO)Support Load Module auth basic module modules/mod auth basic.so LoadModule auth digest module modules/mod auth digest.so LoadModule authn file module modules/mod authn file. so Load Module authn alias module modules/mod authn alias. so LoadModule authn anon module modules/mod authn anon.so

#事实上没有客户程序在一次连接中请求太多的页面,通常达不到这个上限就完成连接了 MaxKeepAliveRequests 100 #在使用保持连接功能时,KeepAliveTimeout测试一次连接中的多次请求传输之间的时间, #如果服务器已经完成了一次请求,但一直没有接收到客户程序的下一次请求, #在时间间隔超过了这个参数设置的值之后,服务器就断开连接 KeepAliveTimeout 15 # Server-Pool Size Regulation (MPM specific) #设置使用prefork.mpm运行方式的参数,此运行方式是RedHat的默认方式 StartServers 8 //设置服务器启动时运行的进程数 MinSpareServers 5 //Apache在运行时会根据负载的轻重自动调整空闲子进程的数目,若存在低于5个 //空闲子进程,就创建一个新的子进程准备为客户提供服务 MaxSpareServers 20 //若存在高于20个空闲子进程,就逐一删除子进程来提高系统性能 ServerLimit 256 MaxClients 256 //限制同一时间的连接数不能超过256 MaxRequestsPerChild 4000 //限制每一个子进程在结束处理请求之前能处理的连接请求为4000 #设置使用worker MPM运行方式的参数 StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 #设置服务器的监听端口号 #Listen 12.34.56.78:80 Listen 80 #动态加载模块(DSO) # Dynamic Shared Object (DSO) Support LoadModule auth_basic_module modules/mod_auth_basic.so 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 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 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 modu od authnz ldapso LoadModule include module modules/mod include. so LoadModule log config module modules/mod log config.so LoadModule eny 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 headers module modules/mod headers.so LoadModule usertrack module modules/mod usertrack so LoadModule setenvif module modules/mod setenvifso Loadmodule day module modules/mod day LoadModule status module modules/mod status.so LoadModule autoindex module modules/mod autoindex. so LoadModule info module modules/mod info. so Load module day fs module modules/mod day fs. so LoadModule dir module modules/mod dir LoadModule actions module modules/mod actions. so LoadModule speling_module modules/mod speling.so Load Module userdir module modules/mod userdir so LoadModule rewrite module modules/mod rewrite. so LoadModule proxy balancer modules/mod proxy balancer.so LoadModule proxy_ ftp module modules/mod_proxy_ftp.so Loadmoduleproxyhttpmodulemodules/mod_proxy_http.so Load Module cache module modules/mod cache. so LoadModule suexec module modules/mod suexec 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 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_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 mem cache module modules/mod mem cache. so LoadModule cgi module modules/mod cgi.so LoadModule version module modules/mod version. so #Loadconfigfilesfromtheconfigdirectory"/etc/httpd/conf.d Include conf d/%.c # Apache服务器可以通过特殊的HTP请求,来报告自身的运行状态,打开这个 Extendedstatu参数 #可以让服务器报告更全面的运行状态信息 ExtendedStatus On #设置运行 Apache服务器的用户和组 User apache ##f# Section 2: Main server configuration #f The directives in this section set up the values used by the main #f 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 #f All of these directives may appear inside containers, #f in which case these default settings will be overridden for the virtual host being defined Server Admin rootalocalhost ∥设置 Apache服务器管理员的Ema地址 #缺省情况下,并不需要指定这个 Servername参数,服务器将自动通过名字解析过程来获得自己的名字, #但如果服务器的名字解析有问题(通常为反向解析不正确),或者没有正式的DNS名字,也可以在这里 #指定IP地址。如果 ServerName设置不正确,服务器将不能正常启动 If your host doesn't have a registered DNS name, enter its IP address here #f You will have to access it by its address anyway, and this will make #f redirections work in a sensible way #serVernamewww.examplecom80 #若关闭此选项,当 Apache服务器需要指向本身的连接使使用 ServerName port作为主机名,例如

LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule cgi_module modules/mod_cgi.so LoadModule version_module modules/mod_version.so # Load config files from the config directory "/etc/httpd/conf.d". Include conf.d/*.conf # Apache服务器可以通过特殊的HTTP请求,来报告自身的运行状态,打开这个ExtendedStatus 参数 #可以让服务器报告更全面的运行状态信息 #ExtendedStatus On #设置运行Apache服务器的用户和组 User apache Group 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 root@localhost //设置Apache服务器管理员的E_mail地址 #缺省情况下,并不需要指定这个ServerName参数,服务器将自动通过名字解析过程来获得自己的名字, #但如果服务器的名字解析有问题(通常为反向解析不正确),或者没有正式的DNS名字,也可以在这里 #指定IP地址。如果ServerName设置不正确,服务器将不能正常启动 # 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 #若关闭此选项,当Apache服务器需要指向本身的连接使使用ServerName:port作为主机名,例如

#www.edu.cn:80若打开此选项将使用www.edu.cnprot80作为主机名 UseCanonicalName Off # Document?定义这个服务器对外发布的超文本文档存放的路径,客户程序请求的URL就被映射为 #这个目录下的网页文件。这个目录下的子目录,以及使用符号链接指出的文件和目录都能被浏览器 #访问,只是要在URL上使用同样的相对目录名 Document Root"/var/www/html #设置 Apache服务器根的访问权限 #注意: Apache对一个目录的访问权限的设置能够被下一级目录继承 # Apache在目录的访问控制中提供了 FollowSymLinks选项来打开或关闭支持符号链接的特性。 #符号链接虽然逻辑上位于本目录之下,但实际上可以位于计算机上的任意目录中,因此可以 #使客户程序能访问那些根文档目录之外的目录,在增加了灵活性的同时降低了系统的安全性 AllowOverride None 禁止读取 htaccess配置文件的内容 #设置根文档目录的访问权限 # Indexes:若在目录中找不到 Directorylndex到表中指定的文件就生成当前的文件列表 # FollowSymLinks:允许符号链接,可以访问不在根文档目录下的文件 Options Indexes FollowSymLinks # Apache服务器可以针对目录进行文档的访问控制,然而访问控制可以通过两种方式来实现, 个是在配置文件httpd.con中针对每个目录进行设置,另一个方法是在每个目录下设置 #访问控制文件,通常访问控制文件名字为 htaccess。虽然使用这两个方式都能用于控制浏览器 #的访问,但是使用配置文件的方法要求每次修改后要重启 Apache服务器,因此该方法主要用于 #配置服务器系统的整体安全控制策略,而使用每个目录下的 htaccess文件设置具体目录的 #访问控制更为灵活方便 AllowOverride None/禁止读取 htassess配置文件的内容 Order allow,deny/指定先执行Alow(允许)访问规则,再执行Deny(拒绝)访问规则 Allow from all∥设置Alow(允许)访问规则,允许所有连接 #为每个用户进行服务器的配置 UserDir disable/不允许为每个用户进行服务器的配置 #User Dir public html

# www.edu.cn:80若打开此选项,将使用www.edu.cn prot 80作为主机名 UseCanonicalName Off #DocumentRoot定义这个服务器对外发布的超文本文档存放的路径,客户程序请求的URL就被映射为 #这个目录下的网页文件。这个目录下的子目录,以及使用符号链接指出的文件和目录都能被浏览器 #访问,只是要在URL上使用同样的相对目录名 DocumentRoot "/var/www/html" #设置Apache服务器根的访问权限 #注意:Apache对一个目录的访问权限的设置能够被下一级目录继承 # Apache在目录的访问控制中提供了 FollowSymLinks选项来打开或关闭支持符号链接的特性。 #符号链接虽然逻辑上位于本目录之下,但实际上可以位于计算机上的任意目录中,因此可以 #使客户程序能访问那些根文档目录之外的目录,在增加了灵活性的同时降低了系统的安全性 Options FollowSymLinks AllowOverride None //禁止读取.htaccess配置文件的内容 #设置根文档目录的访问权限 # Indexes:若在目录中找不到DirectoryIndex到表中指定的文件就生成当前的文件列表 # FollowSymLinks:允许符号链接,可以访问不在根文档目录下的文件 Options Indexes FollowSymLinks # Apache服务器可以针对目录进行文档的访问控制,然而访问控制可以通过两种方式来实现, #一个是在配置文件httpd.conf中针对每个目录进行设置,另一个方法是在每个目录下设置 #访问控制文件,通常访问控制文件名字为.htaccess。虽然使用这两个方式都能用于控制浏览器 #的访问,但是使用配置文件的方法要求每次修改后要重启Apache服务器,因此该方法主要用于 #配置服务器系统的整体安全控制策略,而使用每个目录下的.htaccess文件设置具体目录的 #访问控制更为灵活方便 AllowOverride None //禁止读取.htassess配置文件的内容 Order allow,deny //指定先执行Allow(允许)访问规则,再执行Deny(拒绝)访问规则 Allow from all //设置Allow (允许) 访问规则,允许所有连接 #为每个用户进行服务器的配置 UserDir disable //不允许为每个用户进行服务器的配置 #UserDir public_html

Control access to UserDir directories. The following is an example for a site where these directories are restricted to read-only # AllowOverride FileInfo Auth Config Limit Options Multi Views Indexes SymLinkslfowner Match Includes NoExec f Order allow, deny f #f Order deny allow Deny from all #f #一般情况下,访问某个网站时,URL中并没有指定网页文件名,而只是给出了一个目录名或网址 # Apache服务器就自动返回这个目录下由 Directorylndex定义的文件。在这个目录下可以指定多个 #文件名,系统会根据指定顺序搜索,当所有由 Directory Index指定的文件都不存在时, Apache服务器 #可以根据系统设置,生成这个目录下的所有文件列表,提供用户选择。此时该目录的访问控制选项 #中的 lIndexes选项( Options Indexes)必须打开,以使得服务器能够生成目录列表,否则将拒绝访问 #当访问服务器时,依次查找页面 I index. html, index html. var Directory Index index html index html. var #定义每个目录下的访问控制文件的文件名,缺省为 htaccess,可以通过更改这个文件来改变 #不同目录的访问控制限制 AccessFileName htaccess #拒绝访问以h开头的文件保证 htaccess文件不被访问 Order allow deny #指定负责处理MIME对应格式的配置文件的存放位置 Types Config /etc/mime types #如果Web服务器不能决定一个文档的缺省类型(这通常表示文档使用了非标准的后缀),那么服务器 #就使用 Default Type定义的MM类型将文档发送给客户浏览器。这里的设置为 text/plain,这样设置的问 #题是,如果服务器不能判断出文档的MME,那么大部分情况下这个文档为一个二进制文档,但使用 # text/plain格式发送回去,浏览器将在内部打开它而不会提示保存。因此建议将这个设置更改为

# Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. # # # AllowOverride FileInfo AuthConfig Limit # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec # # Order allow,deny # Allow from all # # # Order deny,allow # Deny from all # # #一般情况下,访问某个网站时,URL中并没有指定网页文件名,而只是给出了一个目录名或网址, # Apache服务器就自动返回这个目录下由DirectoryIndex定义的文件。在这个目录下可以指定多个 #文件名,系统会根据指定顺序搜索,当所有由DirectoryIndex指定的文件都不存在时,Apache服务器 #可以根据系统设置,生成这个目录下的所有文件列表,提供用户选择。此时该目录的访问控制选项 #中的Indexes选项(Options Indexes )必须打开,以使得服务器能够生成目录列表,否则将拒绝访问。 #当访问服务器时,依次查找页面index.html、index.html.var DirectoryIndex index.html index.html.var #定义每个目录下的访问控制文件的文件名,缺省为.htaccess,可以通过更改这个文件来改变 #不同目录的访问控制限制 AccessFileName .htaccess #拒绝访问以.ht开头的文件,保证.htaccess文件不被访问 Order allow,deny Deny from all #指定负责处理MIME对应格式的配置文件的存放位置 TypesConfig /etc/mime.types #如果Web服务器不能决定一个文档的缺省类型(这通常表示文档使用了非标准的后缀),那么服务器 #就使用DefaultType定义的MIME类型将文档发送给客户浏览器。这里的设置为text/plain,这样设置的问 #题是,如果服务器不能判断出文档的 MIME,那么大部分情况下这个文档为一个二进制文档,但使用 #text/plain格式发送回去,浏览器将在内部打开它而不会提示保存。因此建议将这个设置更改为

# application/octet-stream,这样浏览器将提示用户进行保存 DefaultType text/plain 指定默认的MIME文件类型为纯文本或HIML文件 #当 mod mime magic.c模快被加载时指定Magc信息码配置文件的存放位置 #MIMEMagicFile /usr/share/magicmime MIMEMagicFile confimagic #只记录连接 Apache服务器的p地址而不记录主机名 #指定错误日志存放位置 arm∥指定记录的错误信息的详细等级为w warn 定义四种记录日志的格式 LogFormat%h%l%u%t V"%r\"%>s %b l"% Referer)i"1%! User-Agent)i""combined LogFormat"%h %l %u %t"%r\%>s%b"common LogFormat "%User-agent i"agent #"combinedio"includes actual counts of actual bytes received (%1)and sent (%O), this requires the mod logio module to be loaded #Log Format"%h %l %u %t V"%r\"%>s %b 1 "% Referer )i"% User-Agent)it"%1%0"combinedio #指定访问日志的记录格式为 combinded混合型,并指定访问日志存放位置 ServerSignature on ∥设置 Apache自己产生的页面中使用 Apache服务器版本的签名 Alias /icons/"/var/www/icons/ ∥设置目录的访问别名 设置∧ ar/www/icons目录的访问权限 Options Indexes Multi Views AllowOverride None Order allow. der Allow from all

#application/octet-stream,这样浏览器将提示用户进行保存 DefaultType text/plain //指定默认的MIME文件类型为纯文本或HTML文件 #当mod_mime_magic.c模快被加载时,指定Magic信息码配置文件的存放位置 # MIMEMagicFile /usr/share/magic.mime MIMEMagicFile conf/magic #只记录连接Apache 服务器的ip地址,而不记录主机名 HostnameLookups Off #指定错误日志存放位置 ErrorLog logs/error_log LogLevel warn //指定记录的错误信息的详细等级为warn #定义四种记录日志的格式 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 # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this # requires the mod_logio module to be loaded. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio #指定访问日志的记录格式为combinded(混合型),并指定访问日志存放位置 CustomLog logs/access_log combined ServerSignature On //设置Apache自己产生的页面中使用Apache 服务器版本的签名 Alias /icons/ "/var/www/icons/" //设置目录的访问别名 //设置/var/www/icons目录的访问权限 Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all

#指定DAV加锁数据库文件的存放位置 Location of the WebDa V lock database DAVLockDB/var/lib/dav/ockdb ScriptAlias /cg-bin/"/ar/ww/eg-bn/"/设置CGl目录的访问别名 ∥设置CG目录的访问权限 AllowOverride None Allow from all #设置自动生成目录列表的显示方式 # fancyindexing:对每种类型的文件前加上一个小图标以示区别 # versiosort:对同一个软件的多个版本进行排序 # Name width=*:文件名域宽自动适应当前目录下最大之文件长度 Indexoptions Fancy Indexing VersionSort Name width=* HTMLTable #当使用 indexOptions Fancyindexing以后配置下面的参数用于告知服务器在遇到不同的文件类型或扩展 #名时采用MIME编码格式,辨别文件类型井显示相应的图标 AddlconBy Encoding(CMP, /icons/compressed. gif) x-compress x-gzip AddIcon By Type(TXT, /icons/text gif) text/* AddIcon By Type(IMG icons/image2. gif) image/* AddIcon By Type(SND /icons/sound. gif) audio/* AddIcon By Type(VID /icons/movie. gif) video/ #当使用 JindexOptions Fancyindexing以后配置下面的参数用于告知服务器在遇到不同的文件类型或扩展 #名时采用MIME编码格式采用所指定的格式井显示相应的图标 AddIcon /icons/binary. gif. bin.exe AddIcon /icons/binhex.gif. hqx AddIcon /icons/tar. gif,tar AddIcon /icons/world2. gif wrl. wrl. gz vrml vrmiv AddIcon /icons/compressed. gif. Zz tgz. gz zip AddIcon /icons/agif ps ai.eps layout gif. html shtml. htm pdf AddIcon /icons/text. gif txt AddIcon/icons/c.gif AddIcon /icons/p. gif pl py AddIcon /icons/f.gif. for

#指定DAV加锁数据库文件的存放位置 # Location of the WebDAV lock database. DAVLockDB /var/lib/dav/lockdb ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" //设置CGI目录的访问别名 //设置CGI目录的访问权限 AllowOverride None Options None Order allow,deny Allow from all #设置自动生成目录列表的显示方式 # fancyindexing:对每种类型的文件前加上一个小图标以示区别 # versiosort:对同一个软件的多个版本进行排序 # NameWidth=*:文件名域宽自动适应当前目录下最大之文件长度 IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable #当使用indexOptions Fancyindexing以后,配置下面的参数,用于告知服务器在遇到不同的文件类型或扩展 #名时采用MIME编码格式,辨别文件类型并显示相应的图标 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/* #当使用indexOptions Fancyindexing以后,配置下面的参数,用于告知服务器在遇到不同的文件类型或扩展 #名时采用MIME编码格式,采用所指定的格式.并显示相应的图标 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/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 AADIRECTORYAA AddIcon /icons/blank. gif AABLANKICON #当使用 lindexOptions fancyindexing之后且无法识别文件类型时并显示此处定义的图标 Defaultlcon /icons/unknown. gif #当服务器自动列出目录列表时在所生成的页面之后显示 REDME. htm的内容 #当服务器自动列出目录列表时在所生成的页面之前显示 HEADER. htm的内容 ReadmeName README. html HeaderName header html Indexlgnore is a set of filenames which directory indexing should ignore and not include in the listing. Shell-style wildcarding is permitted IndexIgnore ??*** HEADER README* RCS CVS, v*t #设置网页内容的语言种类(浏览器要启用内容协商对中文网页此项无实际意义 Catalan(ca)-Croatian(hr)-Czech(cs)-Danish(da)-Dutch(nl) English(en)-Esperanto(eo)-Estonian(et)-French(fr)-German(de Greek-Modern(el)-Hebrew (he)-Italian(it)-Japanese ga) Korean(ko)-Luxembourgeois"(Itz)-Norwegian Norwegian(no)-Polish(pl)-Portugese(pt #f Simplified Chinese(zh-CN)-Spanish(es)-Traditional Chinese(zh-Tw AddLanguage caca Addlanguage de de AddLanguage el. el AddLanguage eo AddLanguage es es

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^^ #当使用indexOptions fancyindexing 之后,且无法识别文件类型时并显示此处定义的图标 DefaultIcon /icons/unknown.gif #当服务器自动列出目录列表时,在所生成的页面之后显示REDME.html的内容 #当服务器自动列出目录列表时,在所生成的页面之前显示HEADER.html的内容 ReadmeName README.html HeaderName HEADER.html # # IndexIgnore is a set of filenames which directory indexing should ignore # and not include in the listing. Shell-style wildcarding is permitted. # IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t #设置网页内容的语言种类(浏览器要启用内容协商)对中文网页,此项无实际意义 # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) # Norwegian (no) - Polish (pl) - Portugese (pt) # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW) # AddLanguage ca .ca 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 he. he AddLanguage hr hr AddLanguage koko AddLanguage ltz. Itz AddLanguage no.no AddLanguage pl pe AddLanguage pt-BR pt-br AddLanguage ru. ru Addlanguage sy uage 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 Itz nl nn no pl pt pt-BR ru sv zh-CN zh-Tw # Perfer:当有多种语言可以匹配时使用 Languagepriority列表的第一项. Fallback:当没有语言可以匹 #配时使用 LanguagePriority列表的第一项 ForceLanguagePriority Prefer Fallback AddDefaultCharset UTF-8 /设置默认字符集 #设置在线浏览用户可以实时解压缩 Z gz.tzi类型的文件并非所有浏览器都支持 AddType application/x-gzip. gz tgz AddHandler type-map var 设置 Apache对某些扩展名的处理方式 #使用过滤器执行S To parse shtml files for server-side includes(SSn AddType texthtml. shtml AddOutputFilter INCLUDES shtm Alias /error/"/var/www/error/ ∥设置错误页面目录的别名 ∥设置/ ar/www/error目录的访问权限

AddLanguage et .et AddLanguage fr .fr AddLanguage he .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 # Perfer:当有多种语言可以匹配时,使用LanguagePriority列表的第一项. Fallback:当没有语言可以匹 #配时,使用LanguagePriority列表的第一项 ForceLanguagePriority Prefer Fallback AddDefaultCharset UTF-8 //设置默认字符集 #设置在线浏览用户可以实时解压缩.Z.gz.tgz类型的文件并非所有浏览器都支持 AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddHandler type-map var //设置Apache 对某些扩展名的处理方式 #使用过滤器执行SSI # To parse .shtml files for server-side includes (SSI): AddType text/html .shtml AddOutputFilter INCLUDES .shtml Alias /error/ "/var/www/error/" //设置错误页面目录的别名 //设置/var/www/error目录的访问权限

点击下载完整版文档(DOC)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共22页,试读已结束,阅读完整版请下载
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有