某Apache服务器的配置文件httpd.conf包含如下所示配置项。在(32)处选择合适的选项,使得用户可通过http://www.test.cn访问到该Apache服务器;当用户访问http:// 111.25.4.30:80时,会访问到(33)虚拟主机。
NameVirtualHost 111.25.4.30: 80
<VirtualHost 111.25.4.30: 80>
ServerName www.othertest.com
DocumentRoot /www/othertest
</VirtualHost>
<VirtualHost 111.25.4.30: 80>
ServerName (32)
DocumentRoot /www/otherdate
</VirtualHost>
<VirtualHost 111.25.4.30: 80>
ServerName www.test.com
ServerAlias test.com *.test.com
DocumentRoot /www/test
</VirtualHost>
A.www.othertest.com
B.www.test.com
C.www.test.cn
D.ftp.test.com
第1题:
以RPM方式安装的Apache服务器,Apache的主配置文件是(60)。
A.index.html
B.httpd.conf
C.apache.conf
D.srm.conf
第2题:
Apache服务器进程配置文件是 httpd.conf 。
第3题:
A./etc/httpd/httpD.conf
B./etc/Apache2/Apache2.conf
C./etc/Apache2/ports.conf
D./etc/Apache2/httpD.conf
第4题:
请在(5)~(11)空白处填写恰当的内容。
Apache的主配置文件为httpd.conf。某Web服务器的httpd.conf文件部分内容如下:
ServerType Standalone
ServerROOt "/etc/httpd"
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 150
MaxRequestsPerChild 100
Port 8080
User nobody
Group nobody
ServerAdmin root@webtest.com.cn
ServerName WebTest
DocumentRoot "/home/webtest/jakarta- tomcat/webapps/webtest"
Options FollowsymLinks
AllowOverride None
Options Indexes Includes FollowSymLinks
AllowOverride None
Order allow, deny
Allow from all
DirectoryIndex index.html index.htm index.shtm1 index.cgi
Alias /doc/ /usr/doc/
Order deny, allow
deny from all
allow from localhost
Options Indexes FollowSymLinks
以RPM方式安装的Apache服务器,配置文件httpd.conf存储在Linux的(5)目录下。根据上述配置文件,该Web服务器运行在(6)模式下,其运行效率比在inetd模式下(7);当某个Web连接超过(8)秒没有数据传输时,系统断开连接。
如果客户需要访问Linux服务器上/usr/doc目录,则应在浏览器地址栏中输入(9)。
虚拟主机是指在同一台服务器上实现多个Web站点。虚拟主机可以是基于IP地址的虚拟主机,也可以是基于(10)的虚拟主机。创建基于(10)的虚拟主机时,还需要配置(11),并在区数据库文件中添加相关记录。
第5题:
Apache服务器的配置文件httpd.conf中有很多内容,请解释如下配置项:(1)MaxKeepAliveRequests200(2)UserDirpublic_html(3)DefaultTypetext/plain(4)AddLanguareen.en(5)DocumentRoot/usr/local/httpd/htdocs”(6)AddTypeapplication/x-httpd-php.php.php.php4
(1)允许每次连接的最大请求数目,此为200;
(2)设定用户放置网页的目录;
(3)设置服务器对于不认识的文件类型的预设格式;
(4)设置可传送语言的文件给浏览器;
(5)该目录为Apache放置网页的地方;
(6)服务器选择使用php4。