阅读以下说明,回答问题1~5,将答案填入对应的解答栏内。 配置WWW服务器是Linux操作平台的重要工作之一,而Apach是目前应用最为广泛的Web服务器产品之一。在Linux下安装Apache Web服务,Apache服务程序http启动时需要读取

admin2010-12-20  19

问题 阅读以下说明,回答问题1~5,将答案填入对应的解答栏内。
   配置WWW服务器是Linux操作平台的重要工作之一,而Apach是目前应用最为广泛的Web服务器产品之一。在Linux下安装Apache Web服务,Apache服务程序http启动时需要读取配置文件httpd.conf,以下是一个httpd.conf配置文件的片断:
   ##httpd.conf--Apache HTTP server configuration file
   ###Section 1:Global Environment
   ServerType standalone
   ServerRoot  "/etc/httpd"
   Timeout 300
   KeepAlive On
   MaxKeepAliveRequests 100
   KeepAliveTimeout 15
   MaxClients 150
   ###Section 2:’Main’server configuration
   Port 80
   User apache
   Group apache
   ServerAdmin webmaster@abc.com.cn
   ServerName www.abc.com.cn
   DocumentRoot"/var/www/html"
   UserDir public_html
   DirectoryIndex index.html
   Alias/Jianji"/home/zhang/jianji"
   ScriptAlias  /cgi-bin/ "/var/www/cgi-bin/"
   ErrorDocument 404/missing.html
   ###Section 3:Virtual Hosts
   NameVirtualHost 192.168.10.101
   <VirtualHost 192.168.10.101>
       ServerAdmin webmaster@abc.com.cn
      DocumentRoot /www/htdocs/abc
      ServerName markert.abc.com.cn
      ErrwrLog logs/host.some_domain.com-error_log
      CustomLog log/host.some_domain.com-access_log common
  </VirtuaHost>
假设主机的IP地址是192.168.10.100,当用户在浏览器中输入http://192.168.10.100时显示了主页,那么该主页的文件名是_____。

选项

答案index.html

解析 该问题主要是考查索引文件(默认文档)的设置。很多情况下,URL中并没有指定文档的名字,而只是给出了一个目录名,那么Apache服务器就自动返回这个目录下由DirectoryIndex定义的文件,当然可以指定多个文件名字,系统会按顺序搜索。当所有由DirectoryIndex指定的文件都不存在时,Apache服务器可以根据系统设置,生成这个目录下的所有文件列表,提供用户选择。此时该目录的访问控制选项中的Indexes选项(Options Indexes)必须打开,使得服务器能够生成目录列表,否则Apache将拒绝访问。本题中DirectoryIndex只定义了index.html,因些我们看到主页文件名为index.html。
转载请注明原文地址:https://jikaoti.com/ti/wzB7FFFM
0

相关试题推荐
最新回复(0)