首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
叙述Apache web server的安装与配置。
叙述Apache web server的安装与配置。
admin
2009-02-15
35
问题
叙述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
网络管理员下午应用技术考试
软考初级
相关试题推荐
使用白盒测试方法时,应根据(17)和指定的覆盖标准确定测试数据。
某工程计划如图3-5所示,各个作业所需的天数如表3-3所列,设该工程从第0天开工,则作业I最迟应在第(35)天开工。
关于光纤传输,下列不具备的特征是(59)。
The kernel is the(66)of an operating system such as Windows98, Windows NT, Mac OS or Unix. The kernel provides basic services fo
以下图像文件格式中,______不支持真彩色图像。A.PCXB.PNGC.TGAD.EPS
根据题意,补充关系模式中(a)处的空缺,即货物关系模式的属性。根据题意,补充图2-5中缺失的联系和联系的类型,使其成为完善的实体联系图。其中,联系名分别取名为联系1、联系2、联系3……
计算机要对声音信号进行处理时,必须将其转换为数字声音信号。最基本的声音信号数字化方法是取样—量化法。若量化后的每个声音样本用2个字节表示,则量化分辨率是(12)。
函数调用时,基本的参数传递方式有传值与传地址两种,()。
计算机指令一般包括操作码和地址码两部分,为分析执行一条指令,其(5)。
使用白盒测试方法时,确定测试数据应该根据(22)和指定的覆盖标准。一般来说与设计测试数据无关的文档是(23)。软件的集成测试工作最好由(24)承担,以提高集成测试的效果。(25)
随机试题
泵挂深度在600~800m,防冲距约()。
男性,55岁,右颈肩痛1年,伴右手麻3个月。查体颈椎生理弧度消失,颈5~6棘突间压痛,右颈肩部肌肉紧张,右手掌桡侧皮肤感觉减退,右肱二头肌反射亢进,霍夫曼征(+)诊断为颈椎病。在颈椎病的诊断中,以下哪一条是可靠的依据
动脉导管形成解剖上关闭的年龄(约80%)是
酚妥拉明可以应用于治疗顽同性充血性心力衰竭的主要原因是
金属基复合材料的主要性能特点包括()。
在学习古诗《木兰诗》时,为了让学生充分地理解“东市买骏马,西市买鞍鞯,南市买辔头,北市买长鞭”这种修辞手法,老师又为学生列举了以下例子。其中不符合要求的一项是()。
某小学周老师要上一节公开课,为此,她穿了一条非常漂亮的裙子,裙子上面用双面胶粘上了很多自己手工制作的红色小花,非常炫目。上课过程中,周老师的教学环节比较清楚,教学效果也比较好。其中有一点让听课老师觉得很有意思,那就是:周老师在课堂上只要发现某个同学发言积极
根据下面材料回答下列问题。下列所给区域中,2007年1~9月高新技术产业产值最高的是()。
Whatwillmanbelikeinthefuture5000oreven50,000yearsfromnow?Wecanonlymakeguesses,ofcourse,butwecanbesure
Forthispart,youareallowed30minutestowriteashortessayentitledWillHighTechnologyEliminateCulturalDiversity?fol
最新回复
(
0
)