阿帕奇apache服务器怎么配置-_第1页
阿帕奇apache服务器怎么配置-_第2页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、阿帕奇apache服务器怎么配置? 第一篇范文:1.0 版阿帕奇服务器(apache http server)的文件 名目(contents) (略) 序(preface) 这份手册是1.0 版阿帕奇服务器(apache http server)的文件。这个 服务器是阿帕奇方案的产品,此方案试图回应某些对乐观进展一套可以 免费取得之 http 服务器的关怀。这个方案的目标是供应一个平安的, 有效率的而且可以扩充功能的服务器,此服务器供应 http 服务且符合 目前的 http 标准。 这套阿帕奇 httpd 服务器的设计不但与 ncsa httpd 1.3 相容,并且 供应经常有人要求的特色,

2、像是 。作为身分验认之用的 dbm 资料库 。自定的(customised)错误与问题回应方式 。多重的 directoryindex 指令 。不限次数的 alias 以及 redirect 指令 。以内容为基础的(content-based) 文件协商(negotiation) 。虚拟服务器 阿帕奇授权书 copyright 1995 the apache group. all rights reserved. 假如符合下列条件,无论是否经过修改,以原始程序及执行程序的形式 散播与使用都是许可的: 1. 散播原始程序码必需保留上述的版权告示,这份条件列表以及下列 声明。 2. 以执行程序码的

3、形式散播必需在随附散播的文件以及或是资讯中 重现上述的版权告示,这份条件列表以及下列声明。 3. 全部提及或使用这套软体特色的广告都必需显示下列讯息: this product includes software developed by the apache group for use in the apache http server project (http:/./). 4. apache server 以及 apache group 这些名称没有随附前述的 的许可不得用来为这套软体的衍生产品背书或鼓舞采纳。 5. 以任何形式散播都必需保留下列讯息: this pr

4、oduct includes software developed by the apache group for use in the apache http server project (http:/./). redistribution and use in source and binary forms, with or without modification, are permitted provided that the following condictions are met: 1. redistribution of source code must

5、retain the above copyright notice, this list of condictions and the following disclaimer. 2. redistribution in binary form must reproduce the above copyright notice, this list of condictions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. a

6、ll advertising materials mentioning features or use of this software must display the following acknowledge: this product includes software developed by the apache group for use in the apache http server project (http:/./). 4. the names apache server and apache group must not be used to en

7、dorse or prompt products derived from this software without prior written permission. 5. redistribution of any form whatsoever must retain the following acknowledge: this product includes software developed by the apache group for use in the apache http server project (http:/./). this soft

8、ware is provided by the apache group as is and any expressed or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a pariticular purpose are disclaimed. in no event shall the apache group or its contributors be liable for any direct,indirect,

9、 incidetal, special, exemplary or consequential damages (including,but not limited to, procurement of substitute goods or services;loss of use, data or profits; or business interruption) however caused and on any theory of liability, wherher in contract, strict liability, or tort (including negligen

10、ce or other wise)arising in any way out of the use of this software, even if advised of the possibility of such damage. this software consists of voluntary contributions made by many individuals on behalf of the apache group and was originally based on public domain software written at the national

11、center for supercomputing applications, university of illinois, urbana- champaign. for more information on the apache group and the apache http server project, please see http:/./. 第一章 编译以及安装阿帕奇 1.1下载阿帕奇 最新的阿帕奇资讯可以在阿帕奇网站 http:/./ 找到。 此处会列出目前发行的版本,任何更新的公开测试版,同时还有映射的 (mirror)网站与匿名文

12、件传输(ftp) 站之细节。 1.2编译阿帕奇 这一版的阿帕奇支援所谓的选用性模组。然而,为了使这些模组能 有效率,此服务器必需知道哪些模组要编译进去;这需要产生一点短短 的程序码(modules.c) 单纯地列出它们。 假如你满足我们的标准模组集,而且准备连续让它保持这样,那麽你可 以直接编辑我们供应的 makefile 并且犹如你以前作过的一样编译它。 假如你想要使用选用性模组,那麽无论如何,你都得执行配置指令稿。 这样做: 1. 编辑 configuration 这个文件。这里面包含每一种机器 的 makefile 设定,而且在这底下还有个额外的节区列出要 编译进去的模组,以及包含这些模

13、组的文件名称,你将得: (a) 选择适合你机器的一种编译器以及编译选项。 (b) 消掉相对於你想包含进去的模组上面的注解(文件底 端列出模组的那些行)或者加上对应你自己所撰写之 自制(custom)模组的一些新行。留意,假如你想要有 dbm 验认(auth)的话必需明确地配置进去;只要消掉 对应的行上面的注解即可。 2. 执行 configure 这个指令shell; % configure using configuration as config file % 这会产生新版的 makefile 以及 modules.c 文件。假如你 想要维护多个配置,那麽你可以这样,例如 % config

14、ure -file configuration.ai using alternate config file configuration.ai % 3. 键入 make 我们放进阿帕奇发行套件里的模组是我们测试过而且有很多 阿帕奇进展群成员使用的模组。这些成员或协力团体(third parties)协作特别需要或功能而贡献的一些额外模组可以在 里 找到。在该网页上有如何连结这些模组到阿帕奇核心程序码 里去的说明。 1.3安装阿帕奇 编译之後,你将会在 src/ 名目里获得一份称为 httpd 的可执行文件。阿帕奇的可执行文件发行套件会供应这个文件。 下一个步骤是为服务器编辑配置档。你应当会在称

15、为 conf 的名目里发觉三个配置档的发行版本: srm.conf-dist, access.conf-dist 以及 httpd.conf-dist 。把它们复制成所需的 srm.conf, access.conf 及 httpd.conf 文件。 首先编辑 httpd.conf 。这设定此服务器一般的属性;端口号,执行者的身分等等。接下来编辑 srm.conf 文件;这设定文件树的根名目,指定像是服务端剖析的 html 或内部的影像地图(imagemap)剖析等等功能。最後编辑 access.conf 文件,至少作些存取(access)的基本设定。 最後,调用httpd 程序,使用 -f

16、参数协作 httpd.conf 所在的完整路径。像是,最普遍的例子: /usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf 现在服务器应当已经开头执行。 依照预设 srm.conf 以及 access.conf 这些文件是藉由名称定位的;要藉由其它的名称来指定调用它们的话,可以在 httpd.conf 里面使用accessconfig 以及 resourceconfig 指令。 其次章 启动阿帕奇 2.1启动阿帕奇 httpd 这支程序可以藉由网际网路服务程序 inetd 在每一次有连线要进入 http

17、 服务的时候启动,或者另一种方式,它也可以作为服务程序(daemon)持续地执行,处理恳求。无论选择哪一种方式,都必需设定这个 servertype 指令告知服务器它要如何执行。 2.2命令列选项 下列选项可以用在 httpd 的命令列上: -d serverroot 把 serverroot 这个参数的起始值设定为 serverroot 。这可以藉由在配置文件里面的 serverroot 命令来加以转变。此预设为/usr/local/etc/httpd 。 -f config 启动时执行在 config 文件里面的指令。假如 config 没有以 /作为开头的话,那麽它会被当作相对於 ser

18、verroot 的路径。此预设值是 conf/httpd.conf 。 -x 以单一程序(single-process)模式执行,只用在内部除错;服务程序不会脱离终端作业或是产生任何子程序。不要使用这个模式来供应正常的网页服务。 -v 其次篇范文:虚拟机中如何在linux上安装和配置apache服务器 每日一句: i am a slow walker, but i never walk backwards.(我走得很慢,但从来不后退。) 一、本次配置 a) 操作系统:linux b) 服务器: c) apr: d) apr-util: e) pcre: 二、linux安装程序的基本步骤 1、.

19、/configure -prefix=安装名目 2、make 3、make install 三、linux安装apache服务器步骤: 1、gzip -d httpd- nn.tar.gz (阿帕奇服务器安装包) 2、tar xvf httpd- nn.tar(执行第一步后消失这个文件) 3、cd httpd- nn(执行完其次步后会产生一个服务器的名目,使用cd命令进入) 4、安装程序的基本步骤 5、安装名目/bin/apachectl -k start (启动服务器) 6、测试。打开扫瞄器输入http:/服务器ip,假如消失it works,则服务器安装胜利 7、安装过程中遇到的问题 a)

20、 安装服务器时提示缺少apr文件(到官网下载后进行安装(还是根据安装步骤) b) 安装apr时提示的确apr-util(到后进行安装(还是根据安装步骤) c) 安装服务器时提示的确pcre(到后进行安装(还是根据安装步骤) 四、配置apache的虚拟主机 a) 将“安装名目confhttpd.conf ”中“#include etc/extra/httpd-vhosts.conf ”的#去掉。 这样才能使httpd-vhosts.conf文件起作用,或者直接在httpd.conf中写配置也可以(不建议这么做) b) 在httpd-vhosts.conf中配置virtualhost(注:apac

21、he在接受到恳求时,首先会默认 第一个virtualhost,然后再找匹配的,假如没有匹配的,默认就是第一个virtualhost起作用) virtualhost *:80 #主机名 serveradmin admin #假如服务器有任何问题将发信到这个地址 documentroot / #虚拟主机的指向名目 servername #访问主机的域名:端口号 serveralias * #- -这个不知道是啥。 errorlog logs/-error_log #虚拟主机发生错误时的记录日志(可省略) customlog logs/_access_log common #对虚拟主机发出恳求时的记

22、录日志(可省略) 【】 directory / #虚拟主机对名目的访问权限1(默认为不行访问, - -这里对其进行了修改、) options followsymlinks indexes allowoverride none order deny,allow allow from all require all granted /directory /virtualhost c) 修改本地的hosts文件。(c:windowssystem32driversetchost)。 格式:服务器ip 主机域名(e.g: ) d) 测试。http:/主机域名。看到默认网页或者看

23、到文件和名目列表(有权限时)。 【1】访问权限:当其允许时,假如没有默认的页面可以显示,扫瞄器就会显示文件根名目的名目列表,名目列表包括文件根名目下的文件和子名目。否则则显示: forbidden you dont have permission to access / on this server. 第三篇范文:阿帕奇 http 服务器参考手册 阿帕奇 http 服务器参考手册-老文档一篇 http:/ apache an http server reference manual david robinson and the apache group, 1995 http:/.apache.

24、org/ 保留全部权利。这个产品或文件受版权爱护并且得在限制其用途,复制 ,散播以及编辑的授权下散播。细节请参阅阿帕奇授权书。 版权全部者不对这份手册的内容作任何保证及建议而且特殊声明不保证 符合任何商业目的。 版权全部者保留修订这份手册的权利且其内容得依时变更而不必通知任 何人这些修订与变更。 all rights reserved. this product or documentation protected by copyright and is distributedunder licencesrestricting its use,copying,distribution and

25、decompilation. see the apache licencefor details. the copyright owner gives no warranties and makes no representations about the contents of this manual and specifically disclaims warranties of merchantability of fitness for any purpose. the copyright owner reserves the right to revise this manual a

26、nd make changes from time to time in its contents without notifying any person of such revision or changes. trademarks unix is a registered trademark of unix system laboratories, inc. sun and sunos are trademarks of sun microsystems, inc. netscape is a trademark of netscape communications corporatio

27、n. all other product names mentioned herein are trademarks of their respective owners. 名目(contents) (略) 序(preface) 这份手册是 1.0 版阿帕奇服务器(apache http server)的文件。这个 服务器是阿帕奇方案的产品,此方案试图回应某些对乐观进展一套可以 免费取得之 http 服务器的关怀。这个方案的目标是供应一个平安的, 有效率的而且可以扩充功能的服务器,此服务器供应 http 服务且符合 目前的 http 标准。 这套阿帕奇 httpd 服务器的设计不但与 ncsa

28、 httpd 1.3 相容,并且 供应经常有人要求的特色,像是 。作为身分验认之用的 dbm 资料库 。自定的(customised)错误与问题回应方式 。多重的 directoryindex 指令 。不限次数的 alias 以及 redirect 指令 。以内容为基础的(content-based) 文件协商(negotiation) 。虚拟服务器 阿帕奇授权书 copyright 1995 the apache group. all rights reserved. 假如符合下列条件,无论是否经过修改,以原始程序及执行程序的形式 散播与使用都是许可的: 1. 散播原始程序码必需保留上述的版

29、权告示,这份条件列表以及下列 声明。 2. 以执行程序码的形式散播必需在随附散播的文件以及或是资讯中 重现上述的版权告示,这份条件列表以及下列声明。 3. 全部提及或使用这套软体特色的广告都必需显示下列讯息: this product includes software developed by the apache group for use in the apache http server project (http:/./). 4. apache server 以及 apache group 这些名称没有随附前述的 的许可不得用来为这套软体的衍生产品背书或鼓舞采纳。

30、 5. 以任何形式散播都必需保留下列讯息: this product includes software developed by the apache group for use in the apache http server project (http:/./). redistribution and use in source and binary forms, with or without modification, are permitted provided that the following condictions are met: 1. redist

31、ribution of source code must retain the above copyright notice, this list of condictions and the following disclaimer. 2. redistribution in binary form must reproduce the above copyright notice, this list of condictions and the following disclaimer in the documentation and/or other materials provide

32、d with the distribution. 3. all advertising materials mentioning features or use of this software must display the following acknowledge: this product includes software developed by the apache group for use in the apache http server project (http:/./). 4. the names apache server and apache

33、 group must not be used to endorse or prompt products derived from this software without prior written permission. 5. redistribution of any form whatsoever must retain the following acknowledge: this product includes software developed by the apache group for use in the apache http server project (h

34、ttp:/./). this software is provided by the apache group as is and any expressed or implied warranties, including, but not limited to, theimplied warranties of merchantability and fitness for a pariticularpurpose are disclaimed. in no event shall the apache group or itscontributors be liabl

35、e for any direct,indirect, incidetal, special,exemplary or consequential damages (including,but not limited to,procurement of substitute goods or services;loss of use, data orprofits; or business interruption) however caused and on any theory of liability, wherher in contract, strict liability, or tort (including negligence or other wise)arising in any way out of the use of this software, even if advised of the possibility of such damage. this software consists of voluntary contributions made by many individuals on behalf of the apache group and was originally based on public domai

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论