首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
叙述Apache web server的安装与配置。
叙述Apache web server的安装与配置。
admin
2009-02-15
53
问题
叙述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://ht- tpd. apache. org/download. cgi下载。目前的最新稳定版本是httpd-2. 0.53。http://httpd.apache.org/docs-project/有该软件比较全面的帮 助文档。hap://httpd. apache. ore/docs/misc/FAQ.html回答了该软件的常见问题。 3.软件的安装 1)安装 从其官方网站下载源码软件包httpd-2.0.53.tartsz。接下来将对安装过程的一些重要步骤给出解释。 [root@localhostroot]#tarxzvfhttpd-2.0.53.tar.gz [root@loealhostroot]#cd htlpd-2.0.53 [root@loealhosthttpd-2.0.53]#./configure [root@localhosthttpd-2.0.53]#make [root@localhosthUpd-2.0.53]#makeinstall t8rxzvfhttpd-2.0.53.tartSz解压缩软件包。 ./configure针对机器作安装的检查和设置,大部分的工作是由机器自动完成的,但是用户可以通过一些参数来完成一定的设置,其常用选项如下。 /configure- -help查看参数设置帮助。 - -prefix:指定软件安装目录(默认usr/local/apache2)。 - -enable-modules=指定需要加载的模块。 - -enable-v4-mapped支持IPv6的socket处理1Pr4的连接。 可以设置的参数很多,可以通过-help查看需要的参数,一般情况下,默认设置就可以了。 默认安装建了/usr/local/apache2目录,下面介绍/usr/ loeal/a- pache2的几个常用组成部分。 /usr/local/apache2/bin其中主要是有服务器的程序。常用的有 demon程序httpd和控制脚本apachectl。 /usv/local/apache2/conf其中主要是服务器相关的配置文件。最主要的配置文件是httpd. conf。 /usr/loeal/apache2/htdocs默认的网站html文件根目录。 /usr/local/apache2/cgi-bin默认的cgi程序的存放目录。 2)启动 [root@localhostroot]#/usr/local/apache2/bia/apacheetlstart [root@localhostroot]卸salLX [root@loealhostroot]#netstat-oil 如果不出问题,ps aux应该可以查到httpd的进程,或netstat-an也可以看到80端口的服务已经启动了。如果要设置开机自启动web server,只需在/etc/rc.d/rc.10cal中加入一行 /usr/local/apache2/bin/apachectl start 该文件内容如下。 #!/bin/sh # #This script will bc executed*after*all the other init scripts. #You can put your owu initialization stuffin here ifyou dont #want to do the full Sys V style 1nit stuff touch/ var/ lock/ subsys/ local /usr/local/apache2/bin/apachectl start 4.软件的配置 /usr/local/apache2/conf/httpd. conf默认安装,所有的配置都有默认值,接下来介绍一些常用的配置项。 glisten: Allows you to bind Apache to specific IP addresses and/or #ports, instead of the default. See also the < Virtual Host > # directive. # #Change this to Listen on specific IP addresses as shown below to #prevent Apache from glomming onto all bound [P addresses ( 0.0.0. 0) # glisten 12.34.56.78:80 Listen 80 设定apache的侦听地址和端口。 # #Server Admin 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 # Server Admin you@ examplc, com 设定apache的管理员邮件地址。 # #Document Root 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"/usr/local/apache2/htdocs" 设定apache web server的文档根目录,必须是绝对路径。 < Dirnctory"/usr/local/apache2/htdocs" > # #Possible values for the Options directive are" None" ," All", #or any combination of: # Indexes Includes Follow Sym Links Sym LinksifOwner Match ExecCGI Muhi Views # #Note that" Muhi Views" must be named * explicitly * - - - "Options All" #doesn’t give it to you. # #The Options directive is both complicated and important. Please see #http: //httpd. apache, org/docs -2. O/mod/core. Html #options /flor more information. # Options Indexes Follow SymLinks # #Allow Override controls what directives may be placed in. htaccess files. #It can be" All" ," None" ,or any combination of the keywords: # Options Filelnfo Auth Config Limit # Allow Override None # #Controls who can get stuff from this server. # Order allow, deny Allow from all </Directory > 设定文工团档根目录的权限控制,必须和Docnment Root"/usr/local/a- pache2/htdoes"中指定的目录一致。 # #The index, html. var file( a type-map)is used to deliver content. #negotiated documents. The Muhi Views Option can be used for the #same purpose, but it is much slower. # Directorylndex index, html 指定该目录下的索引文档, ScriptAlias/cgi-bin/"/usr/local/apache2/cgi-bin/" 映射egi-bin 的根目录,必须是绝对路径。 < Directory"/usr/local/apache2/cgi-bin" > AllowOverride None Options None Order allow, deny Allow from all </Directory > 设定cgi—bin目录的读写权限,该目录项必须和上一条的设置一致。 5.安装使用的一些经验 1)apache进程的有效用户ID默认为n。b。dY 出于安全方面的考虑,up ache服务器进程的默认有效ID被设置为 nobody,这就意味着该进程只拥有nolmdy的权限,所以必须确保nobody对设置的Dxumcnt Root有足够权限。或者可以配置up achc进程的有效id,但是推荐不要这样做。 2)如果网站的访问量不是很大可以考虑用xinetd超级进程来启 动apache ①打开/usr/locaVapache2/coaf/httpd.conf,修改。 Server Type inetd ②创建/etc/xinetd. d/apache, 内容如下。 #defauh: on #description: The Apache HTTP connections. service http I disable=no socket_ type=stream wait=no user: root server=/usr/sbi/httpd port: 80 #log_ on_ success+=DURATION USERID #log_ on_ failure+=USERID #nice=10 } ③重新启动xinetd。 #/etc/rc. d/init .d/xinetd restart 3)对IPv6的支持 随着计算机网络的不断发展和扩大,IPv6已经越来越为人们所接受,apache自2.0之后的版本开始支持IPv6,下面简单介绍apache针对 IPv6的配置。 默认情况下,apache使用映射到IPv4的lPv6地址,即安装配置时,默认./configure-enable-v4-map,并且在配置文件http.conf中将是: Listen 80。 要使apache区别对待IPv4与IPv6的连接,安装配置时,使用./ configure-disable-v4-map,对应配置文件中http.conf:Listen[::]: 80。这样apache就可以区别对待IPV4与IPv6的连接了。
解析
转载请注明原文地址:https://kaotiyun.com/show/qc3Z777K
本试题收录于:
网络管理员下午应用技术考试题库软考初级分类
0
网络管理员下午应用技术考试
软考初级
相关试题推荐
Because Web servers axe platform and application(71), they can send or request data from legacy or external applications includi
IE7.0浏览器将Web站点分成4种安全区域。其中,“Internet”区域的默认安全级别设置为(8)。
如果两名以上的申请人分别就同样的发明创造申请专利,专利权应授予(10)。
软件设计中划分程序模块通常遵循的原则是要使各模块间的耦合性尽可能弱。一个模块把一个复杂的内部数据结构作为参数传送给另一个模块的耦合方式属于______。A.公共耦合B.数据耦合C.控制耦合D.标记耦合
(12)不是软件工程的基本原理。
在八相调制下,若数字脉;中信号的宽度为416×10-6s,则数据传输速率为(63)。
The kernel is the(66)of an operating system such as Windows98, Windows NT, Mac OS or Unix. The kernel provides basic services fo
软件生命周期可分为软件定义、软件开发和软件运行3个时期,(13)是软件开发期包含的内容。
设文件索引结点中有8个地址项,每个地址项大小为4字节,其中5个地址项为直接地址索引,2个地址项为一级间接索引,1个地址项为二级间接索引。磁盘索引块和磁盘数据块大小为1KB。若要访问文件的逻辑块号分别为8和518,则系统应分别采用(1),而且可以表
随机试题
职能原则的内容。
患儿,4岁。消瘦,活动后有气急、心悸。检查:于胸骨左缘第2肋间听到粗糙而响亮的连续性机器样杂音,初步诊断为动脉导管未闭。该畸形首先可以引起以下哪一方面的改变
下列降血糖药可用于治疗尿崩症的是
对痰液较多的湿咳,为避免痰液阻塞气道,在应用镇咳药的同时应使用()。
皮质激素类药物分子结构中C17-α-醇酮基与碱性四氮唑蓝试液的呈色反应,可用于
A.环孢苷B.来曲唑C.甲氨蝶呤D.卡莫氟E.依托泊苷氟尿嘧啶的前体药物,对结肠和直肠癌疗效较高的是()
根据项目周期,可将社会评价分为()个层次。
下列表达没有语病的句子是()。
中国共产党在新民主主义革命领导权问题上有着深刻认识,党认为实现对革命的领导权的根本保证是()。
A、Mainegraduallybecameamajormarketfortrade.B、Maineprovidedemploymentopportunities.C、Mainewaspoliticallystable.D、
最新回复
(
0
)