Ubuntu16下HTTP服务器配置.docx
《Ubuntu16下HTTP服务器配置.docx》由会员分享,可在线阅读,更多相关《Ubuntu16下HTTP服务器配置.docx(13页珍藏版)》请在三一办公上搜索。
1、计算机网络实验报告实验名称:http服务器的安装和配置学号、姓名:张焓实验 日期:2016-10-14 实验报告日期:2016-10-14实验地点:小组成员分工:一实验目的1、基础配置观察实验:用wireshark抓包分析2、Linux下完成HTTP服务器的安装和配置3、HTTP服务器测试二.实验环境1. 实验设备:软件:linux ubuntu, Windos, Wireshark;硬件:PC 1台2. 网络拓扑结构图如下:三 实验内容及步骤、实验的详细记录、实验结果分析(写出每个命令执行时,所显示的内容,实验中遇到的问题和思考。)1. 安装 apache2米用命令:sudo apt-get
2、 install apache2:Ubuntu 副本(备份 1)正在运行-Oracle VM VirtualBox管理控制视图热键设备帮助I* 食邕处 IS3 V) 10:46 4X 一匚1终端文件(F)编辑(E)查看(V)搜索(S)终端(T)帮助(H)hanQhan-VirtualBoxsudo apt-get install apache2 正在读取软件包列表.完成 正在分析软件包的依赖关系树 正在读取状态信息.完成将会同时安装下列软件:apache2-bin apache2-data apache2-utils libaprl libaprutilllibaprutill-dbd-sql
3、ite3 libaprutill-Idap libluaS.1-0建议安装:apache2-doc apache2-suexec-pristine I apacheZ-suexec-custom下狗【新】软件包将被安装:apache2 apacheZ-btn apache2-data apache2-uttls libaprl libaprutilllibaprutill-dbd-sqlite3 libaprutill-Idap ItbluaS.l-O升级了 0个软件包,券安装了 9个软件包,囊卸载0个软件包,有392个软件包未被升 级。需要下载537 kB的归档。解压缩后会掐耗6,350 k
4、B的额外空间。您希望继续执行吗? Y/n y获取:1 http:/cn. archive, ubuntu .con/ubuntu -3 86.0 kB获耳又:2 http:/cn.archive.ubuntu.con/ubuntu.5.4-lbuildl 77.1 kB获取:3 http:/ /cn.archive.ubuntu.con/ubuntuite3 and64 1.5.4-lbuildl 10.6 kB获取:4 http:/cn.archive.ubuntu.con/ubuntuxenial/matnxenial/mainxenial/matnxenial/matnamd64amd6
5、4amd64libaprl amd64 1.5.2amd64Ubuntu Kylinlibaprutill amd64 1libaprutiH-dbd-sqllibaprutill-Idap am在浏览器输入localhost查看是否成功安装Ubuntu 副本(备份 1)正在运行-Oracle VM VirtualBoxUbuntu systems. It is based on the equivalent page on Debian, from which the Ubuntu Apache packaging is derived. If you can read this page,
6、 it means that the Apache HTTP server installed at this site is working properly. You should replace this file (located at /va r/www/html/index. html) before continuing to operate your HTTP server.管理控制视图热键设备帮助J Apache2 | 127.0.0.1If you are a normal user of this web site and dont know what this page
7、 is about, this probably means that the site/etc/apache2/- apache2.confI .- ports.conf/- mods-enabledIQi Ql (g).园蓟部云三酱(3彩Right Ctrl2. 配置 apache2编辑 apache2.conf:sudo vi /etc/apache2/apache2.confUbuntu 副本(备份 1)正在运行-Oracle VM VirtualBox管理控制视图热键设备帮助I* 宜蜃画 V) 13:27 4X _ B 文件编辑查看历史书签工具帮助X _ I终端文件(F)编辑(E)查
8、看(V)搜索(S)终端(I)帮助(H)your system is serving content from a sub-directory in /srv you must allow access here, or in any related virtual host.irectory /Options FollowSymLinksAllowOverride NoneRequire all deniediry /usr/share AllowOverride None Require all grantediry /var/www/ tOptions Indexes FbllowSynL
9、tnksAllowOverride NoneRequire all granted:ory /srv/Options Indexes FollowSymLinks AllowOverride None151,175%删除原有的index.html,并创建一个新的index.htmlPS:这里可能需要重启一下 apache2 服务:sudo /etc/init.d/apache2 restartRequire all granted期 Ubuntu 副本(备份 1)正在运行-Oracle VM VirtualBox 管理控制视图热健设备帮助|X 一 口终端文件(F)编辑(E)查看(V)搜索(S)
10、终端(T)帮助(H)hanQhan-VirtualBoxvt /etc/apache2/apache2.confhanghan-VirtualBoxsudo rm /var/www/html/tndex.htnlsudo han 的密码:hanghan-VirtualBoxsu密码:rootghan-VirtualBox:/home/han# cd /var/www/htmlrootghan-VirtualBox:/var/www/html# echo this is a test web for zhindex.html rootghan-VirtualBox:/var/www/html#
11、|Ubuntu Kylin1。匚浏览器打开localhost变为:密 Ubuntu 副本(备份 1)正在运行-Oracle VM VirtualBox 管理控制视图热键设备帮助X _ 文件编辑查看历史书签工具帮助 邕 函!) 13:20 O4 localhostI C I 叵搜索旧 D 命this is a test web for zh 彳 fli IB Qi eRight Ctrl3. 由客户端虚拟机访问服务端虚拟机:重新打开一个能与当前作为服务器的虚拟机互相ping通的虚拟机作为客户端,在浏 览器输入服务器IP: 192.168.137.2(上为服务器虚拟机,下为客户端虚拟机,可能需要在
12、 服务器中重启一下dhcp服务)羽 Ubuntu 副本(备份 1)正在运行-OracleVMVirtualBox X管理控制视图热键设备帮助X _ 文件编辑查看历史书签工具帮助通邕 由) 13:21 OJhttp:/localhost/定 | localhost| |Q 搜索旧 D 命t转到二页 lZh右击或下拉显示历史景 Ubuntu 正在运行-Oracle VM Virtual Box 管理控制视图热键设备帮助X _ 文件编辑查看历史书签工具帮助http:/192.168.137.2/X6 192.168.137. h ttp:/192.168.137.2/ this is a test
13、web for zh4.nginx安装与配置安装:xenial-updates/matnxenial-updates/mainamd64 nginx-corexenial-updates/matnamd64 nginx all 1xenial-updates/matnUbuntu Kylin1386 nginx-common1386 nginx-common管理控制视图热键设备帮助配置文件,将端口号由80改为88:X: _ 终端文件(F)编辑(E)查看(V)搜索(S)终端(T)帮助(H)hanQhan-VirtualBox:$ sudo apt-get install nginx sudo h
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Ubuntu16 HTTP 服务器 配置

链接地址:https://www.31ppt.com/p-4925593.html