电网调度自动化维护员

Apache的配置文件名是()。A、apachE.confB、apacheD.confC、http.confD、httpconf

题目

Apache的配置文件名是()。

  • A、apachE.conf
  • B、apacheD.conf
  • C、http.conf
  • D、httpconf
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

以RPM方式安装的Apache服务器,Apache的主配置文件是(60)。

A.index.html

B.httpd.conf

C.apache.conf

D.srm.conf


正确答案:B
解析:以RPM方式安装的Apache服务器,Apache的主配置文件是httpd.conf。

第2题:

在Linux系统中配置Apache服务器,需要具有(5)权限,才可以运行Apache配置工具rfapache。 A.root B.boot C.administrator D.user


正确答案:(5)A或root
(5)A或root 解析:rfapache是Apache Server图形化配置工具,根据Apache Server的特点,结合Windows系统管理员使用IIS的习惯,通过一个友好的交互界面接受用户的命令,完成Apache服务软件(httpd)相关配置文件的修改,管理员就可以不必编辑复杂的、不容易理解的配置文件而定制WWW服务。
Rfapache配置工具需要在KDE环境下以root权限运行,非root用户虽然允许运行和使用配置工具,但由于没有权限修改配置文件,所以即便在配置工具中修改了选项也无法保存和生效。

第3题:

●试题三

叙述Apache web server的安装与配置。


正确答案:

●试题三

【答案】Apache web server的安装与配置如下:

1.Apache web server简介

Apache web server是一款开放源码的web服务器软件,由apache software foundation开发和维护。它是目前世界上使用最为广泛的web服务器软件,支持各种unix平台和Windows平台。这里将介绍它在RedHat Linux 9中最基本的安装和配置。

2.软件的相关资源

官方网站:http://httpd.apache.org/。

源码软件包:Apache是开源的软件,可以在其官方网站http://httpd.apache.org/download.cgi下载。目前的最新稳定版本是httpd-2.0.53http//httpd.apache.orgdocs-project/有该软件比较全面的帮助文档。http//httpd.apache.orgdocsmiscFAQ.html回答了该软件的常见问题。

3.软件的安装

1)安装

从其官方网站下载源码软件包httpd-2.0.53.tar.gz。接下来将对安装过程的一些重要步骤给出解释。

root@localhost root#tar xzvf httpd-2.0.53.tar.gz

root@localhost root#cd httpd-2.0.53

root@localhost httpd-2.0.53#.configure

root@localhost httpd-2.0.53#make

root@localhost httpd-2.0.53#make install

tar xzvfhttpd-2.0.53.tar.gz解压缩软件包。

.configure针对机器作安装的检查和设置,大部分的工作是由机器自动完成的,但是用户可以通过一些参数来完成一定的设置,其常用选项如下。

configure--help察看参数设置帮助。

--prefix=指定软件安装目录(默认/usrlocalapache2)

--enable-modules=指定需要加载的模块。

--enable-v4-mapped支持IPv6socket处理IPv4的连接。

可以设置的参数很多,可以通过-help察看需要的参数,一般情况下,默认设置就可以了。

默认安装建了/usrlocalapache2目录,下面介绍/usrlocal/apache2的几个常用组成部分。

usrlocalapache2bin其中主要是有服务器的程序。常用的有deamon程序httpd和控制脚本apachectl

usv/local/apache2conf其中主要是服务器相关的配置文件。最主要的配置文件是httpd.conf

usrlocalapache2htdocs默认的网站html文件根目录。

usrlocalapache2cgi-bin默认的cgi程序的存放目录。

2)启动

root@localhost root#usrlocalapache2binapachectl start

root@localhost root#ps aux

root@localhost root#netstat-all

如果不出问题,ps aux应该可以查到httpd的进程,或netstat-an也可以看到80端口的服务已经启动了。如果要设置开机自启动web server,只需在/etcrc.drc.10cal中加入一行

usrlocalapache2binapachectl start

该文件内容如下。

#!binsh

#

#This script. will be executed*after*all the other init scripts.

#You can put your own initialization stuffin here ifyou don't

#want to do the full Sys V style. init stuff.

touchvarlocksubsyslocal

usrlocalapache2binapachectl start

4.软件的配置

usrlocalapache2confhttpd.conf默认安装,所有的配置都有其默认值,接下来介绍一些常用的配置项。

#Listen  Allows you to bind Apache to specific IP addresses andor

#portsinstead of the default.See also the<VirtualHost>

# directive.

#

#Change this to Listen on specific IP addresses as shown below to

#prevent Apache from glomming onto all bound IP addresses(0.0.0.0)

#

#Listen 12.34.56.7880

Listen 80

设定apache的侦听地址和端口。

#

#ServerAdmin Your addresswhere problems with the server should be

#e-mailed.This address appears on some server-generated pagessuch

#as error documents.e.g.admin@your-domain.com

#

ServerAdmin you@example.com

管理员邮件地址。

#

#DocumentRoot The directory out of which you will serve your

#documents.By defaultall requests are taken from this directorybut

#symbolic links and aliases may be used to point to other locations.

#

DocumentRoot"usrlocalapache2htdocs"

设定apache web server的文档根目录,必须是绝对路径。

<Directory"usrlocalapache2htdocs">

#

#Possible values for the Options directive are"None""All"

#or any combination of

# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

#

#Note that"MultiViews"must be named*explicitly*---"Options All"

#doesnt give it to you.

#

#The Options directive is both complicated and important.Please see

#http //httpd.apache.orgdocs-2.0modcore.html#options

#for more information.

#

Options Indexes FollowSymLinks

#

#AllowOverride controls what directives may be placed in.htaccess files.

#It can be"All""None"or any combination of the keywords

# Options FileInfo AuthConfig Limit

#

AllowOverride None

#

#Controls who can get stuff from this server.

#

Order allowdeny

Allow from all

<Directory>

设定文档根目录的权限控制,必须和DocumentRoot"usrlocalapache2htdocs"中指定的目录一致。

#

#The index.html.var file(a typemap)is used to deliver content.

#negotiated documents.The MultiViews Option can be used for the

#same purposebut it is much slower.

#

DirectoryIndex index.html

指定该目录下的索引文档,

ScriptAliascgibin"usrlocalapache2cgibin"

映射cgi-bin的根目录,必须是绝对路径。

<Directory"usrlocalapache2cgibin">

AllowOverride None

Options None

Order allowdeny

Allow from all

<Directory>

设定cgi-bin目录的读写权限,该目录项必须和上一条的设置一致。

5.安装使用的一些经验

1)apache进程的有效用户ID默认为nobody

出于安全方面的考虑,apache服务器进程的默认有效ID被设置为nobody,这就意味着该进程只拥有nobody的权限,所以必须确保nobody对设置的DocumentRoot有足够权限。或者可以配置apache进程的有效id,但是推荐不要这样做。

2)如果网站的访问量不是很大可以考虑用xinetd超级进程来启动apache

①打开/usrlocalapache2conf/httpd.conf,修改。

ServerType inetd

②创建/etcxinetd.dapache,内容如下。

#defaulton

#description The Apache HTTP connections.

service http

{

disable=no

socket_type=stream

wait=no

user=root

server=usrsbinhttpd

port=80

#log_on_success+=DURATION USERID

#log_on_failure+=USERID

#nice=10

}

③重新启动xinetd

#etcrc.dinit.dxinetd restart

3)IPv6的支持

随着计算机网络的不断发展和扩大,IPv6已经越来越为人们所接受,apache2.0之后的版本开始支持IPv6,下面简单介绍apache针对IPv6的配置。

默认情况下,apache使用映射到IPv4IPv6地址,即安装配置时,默认.configure-enable-v4-map,并且在配置文件http.conf中将是: Listen 80

要使apache区别对待IPv4IPv6的连接,安装配置时,使用.configure-disable-v4-map,对应配置文件中http.confListen[::]:80。这样apache就可以区别对待IPV4IPv6的连接了。

第4题:

下列说法错误的是( )。

A、Apache可以实现模块动态加载

B、Apache的核心模块是不可以卸载的

C、实现用户主页的模块是mod_userdir.so

D、Apache核心配置文件是www.confd


参考答案:D

第5题:

[问题3](3分)

缺省安装时,Apache的主配置文件名是(7),该文件所在目录为(8).。

配置文件中下列配置信息的含义是(9)一。

<Directory”/var/www/html/secure”>

AllowOverride AuthConfig

Order deny,allow

Allow from 192.168.1.2

Deny from all

</Directory>


正确答案:

【问题3】(3分)

(7)httpd.conf

(8)/etc/httpd/conf

(9)目录"/var/www/html/secure"只允许主机192.168.1.2访问。

第6题:

apache的主配置文件是()。

A.httpd.conf

B.httpd.cfg

C.access.cfg

D.apache.conf


正确答案:A

第7题:

Apache服务器进程配置文件是 httpd.conf 。


正确答案:
              

第8题:

Apache Web 服务器的配置文件一般位于/usr/local/apache/conf目录,其中用来控制用户访问Apache 目录的配置文件是:()

A.httpd.conf

B.srm.conf

C.inetd.conf

D.access.conf


正确答案:A

第9题:

在默认的安装中,Apache把自己的配置文件放在了以下哪个目录中( )?

A、/etc/httpd/

B、/etc/httpd/conf/

C、/etc/

D、/etc/apache/


参考答案:B

第10题:

在以下的文件中,属于Apache主配置文件的是()。

A./etc/httpd/httpD.conf

B./etc/Apache2/Apache2.conf

C./etc/Apache2/ports.conf

D./etc/Apache2/httpD.conf


参考答案:A

更多相关问题