实验1:搭建一个web服务器,访问该服务器时显示“hello world”欢迎界面 。
实验2:建立两个基于ip地址访问的网站,要求如下:
该网站ip地址的主机位为100,设置DocumentRoot为/www/ip/100,网页内容为:this is 100。
该网站ip地址主机位为200,设置DocumentRoot为/www/ip/200,网页内容为:this is 200。
实验3:建立两个基于不同端口访问的网站,要求如下:
建立一个使用web服务器默认端口的网站,设置DocumentRoo为/www/port/80,网页内容为:the port is 80。
建立一个使用10000端口的网站,设置DocumentRoot为/www/port/10000,网页内容为:the port is 10000。
实验1:
创建index.html文件,并添加到/var/www/html/,进入编辑模式
实验2:
[root@client ~]# nmtui
[root@client ~]# vim /etc/httpd/conf.d/ip.conf
实验3:
[root@client ~]# vim /etc/httpd/conf.d/ip.conf