windows server 2008安装配置web服务器[亲测有效]

(24) 2023-03-26 13:04

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说windows server 2008安装配置web服务器[亲测有效],希望能够帮助你!!!。

安装IIS web服务器

IIS是Internet Information Services英文全称的缩写,是一个World Wide Web server服务。IIS是一种Web(网页)服务组件,其中包括Web服务器、FTP服务器、NNTP服务器和SMTP服务器,分别用于网页浏览、文件传输、新闻服务和邮件发送等方面,它使得在网络(包括互联网和局域网)上发布信息成了一件很容易的事。

在服务器管理器中添加角色

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第1张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第2张

默认即可

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第3张

等待安装完成

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第4张

进入Internet信息服务(IIS)管理器

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第5张

点击这里访问默认网站

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第6张

web服务器安装完成

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第7张

此时可以把默认的网站给删除了

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第8张

配置

首先查看虚拟机的ip

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第9张ji

接下来,我们将从三个方面搭建虚拟主机,分别是基于多域名,多端口和多ip来建立虚拟主机,我们在C盘创建web文件夹来存放之后我们搭建的网站

基于多域名的虚拟主机

在web文件夹下创建domain1和domain2文件夹,分别在里面创建index.html,作为我们接下来所创建网站的首页

然后在网站选项中右键添加网站

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第10张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第11张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第12张

此时两个网站我们创建完毕,为了让域名解析成功我们需要手动添加

修改C:\Windows\System32\drivers\etc\hosts ,添加这两个域名的记录,域名解析的知识和内容这里不再说明

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第13张

保存后在cmd上输入ipconfig /flushdns 刷新DNS解析缓存

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第14张

此时用浏览器分别访问www.domain1.com 和 www.domain2.com

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第15张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第16张

基于多端口的虚拟主机

在web文件夹下创建port1和port2文件夹,分别在里面创建index.html,作为我们接下来所创建网站的首页

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第17张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第18张

新建网站,端口设置为81和82

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第19张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第20张

浏览器分别访问192.168.135.158:81 和 192.168.135.158:82

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第21张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第22张

基于多ip的虚拟主机

首先先给虚拟机添加一个网卡

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第23张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第24张

查看新添加的网卡所获得的ip

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第25张

在web文件夹下创建ip1和ip2文件夹,分别在里面创建index.html,作为我们接下来所创建网站的首页windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第26张

接着我们创建网站,这里我们注意到会有两个ip,我们一个网站选择一个

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第27张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第28张

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第29张

浏览器分别访问192.168.135.158 和 192.168.135.159

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第30张

M40TVwDZ-1641730482614)]

浏览器分别访问192.168.135.158 和 192.168.135.159

[外链图片转存中…(img-4y9Dg5pb-1641730482617)]

windows server 2008安装配置web服务器[亲测有效]_https://bianchenghao6.com/blog__第31张

上一篇

已是最后文章

下一篇

已是最新文章

发表回复