1 / 20

第十章 Web 服务器

第十章 Web 服务器. 10.1 WWW/Server 概述. WWW 的基本结构. WWW 的基本结构. HTTP. HTTP ( HyperText Transfer Protocol ) 超文本传输协议. HTTP 基本工作模式. Web Server 的性能. Web Server 的性能衡量指标: (1) 流量 (Throughput):Web Server 每秒钟处理 HTTP 请求的数量,以 HTTPops / sec 为单位。

Download Presentation

第十章 Web 服务器

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第十章 Web服务器

  2. 10.1 WWW/Server概述 • WWW的基本结构 WWW的基本结构

  3. HTTP • HTTP (HyperText Transfer Protocol)超文本传输协议 HTTP基本工作模式

  4. Web Server的性能 • Web Server的性能衡量指标: (1)流量(Throughput):Web Server每秒钟处理HTTP请求的数量,以HTTPops/sec为单位。 (2)响应时间(Response Time):Web Server处理一个HTTP请求的时间,以Msec/HTTPop为单位。

  5. 影响Web Server性能的因素 • Web Server的性能是由其软硬件因素来决定的 1.硬件方面: (1)CPU (2)内存 (3)硬盘 2.软件方面 ·HTTP服务进程 ·TCP/IP实现 ·文件系统 ·数据库 ·CGI程序 另外,网络的传输速度也会影响到Web Server的性能

  6. 10.2 Windows Web服务器的建立 • 在Windows NT 4.0 Server和Windows 2000 Server中,微软均提供了相应版本的IIS(Internet Information Server,Internet信息服务器),用户可以利用IIS快速、便捷地建立WWW、FTP等服务器。

  7. IIS概述 • IIS 5.0包括了以下组件: Internet服务:WWW、FTP服务。 Internet服务管理器:管理Internet服务的工具。 Internet数据库连接器:向数据库发送查询的组件。 密钥管理器:安装安全套接字层(Secure Sockets Layer,SSL)密钥的工具。

  8. 创建Web站点 • 要创建一个新的Web站点,可按如下步骤操作: 1.为新的Web网站创建一个唯一的标识 2.创建新的Web网站

  9. 创建虚拟目录 • 主目录是Web站点目录树的根,其它发布目录称为虚拟目录,用户可以把虚拟目录理解为该Web站点的子站点 。 “虚拟目录创建向导”第二个对话框

  10. 设置Web站点和虚拟目录 虚拟目录属性设置对话框

  11. 添加管理员

  12. 设置站点的安全性

  13. 10.3 UNIX Web服务器的建立 • 检测系统是否安装了Web服务器通过#rpm –q apache • 检查一下系统中运行的进程用ps ax | grep httpd 命令。 Web服务已经运行的显示

  14. 安装Web服务器方法一: # tar xvzf apache_1.3.20.tar.gz # cd # ./configure –prefix=/usr/local/httpd # make # make install # /usr/local/httpd/bin/apacheclt start

  15. 安装Web服务器方法二: 使用Red Hat自带的RPM包。 # cd /mnt/cdrom/RedHat/RPMS # ls *apache* apache-1.3.20-4.i386.rpm apache-devel-1.3.20-4.i386.rpm # rpm –ivh apache-1.3.20-4.i386.rpm # rpm –q apache apache-1.3.20-4.i386.rpm

  16. 配置 • Apache服务器的设置文件位于/usr/local/apache/conf/目录下 • 传统上使用三个配置文件httpd.conf,access.conf和srm.conf,来配置Apache服务器。

  17. 设置主页 • Apache默认的主页存放位置,即index.html文件存放位置是在/home/httpd/html目录下,只需将自己制作的主页文件替换掉该文件,再把制作的其他文件按照链接位置拷贝到相应目录,别人便可以通过浏览器访问你的主页了。

  18. 配置实例 • 配置步骤: 1. 安装apache 1.3.20和php4.0 2.修改配置文件httpd.conf和php.ini 3.启动Apache服务和测试

  19. apache测试页

  20. 一个目录进行登录控制的方法: 1.设置共享目录 2.建立登录访问控制的验证文件 3.创建用户 4.打开本地或远程浏览器在地址栏输入:“http:// 服务器IP或域名

More Related