1.安装httpd,并将访问apache服务器的首页修改为hello.html, 且内容为: "My Home Page is hello”
(1)首先需要明白,成功安装的前提是在 /etc/yum.repo.d/ 下配置了yum源;
然后进行安装:
[root@rhcsa ~]# yum install -y httpd#:成功安装有这么几个包
[root@rhcsa ~]# rpm -qa | grep httpd httpd-tools-2.4.6-97.el7.centos.5.x86_64 httpd-2.4.6-97.el7.centos.5.x86_64 [root@rhcsa ~]##:再来看一下安装成功有哪些包:9090和9091是我自己加的端口,httpd默认端口是80;
[root@rhcsa ~]# netstat -lntup | grep httpd tcp6 0 0 :::80 :::* LISTEN 1593/httpd tcp6 0 0 :::9090 :::* LISTEN 1593/httpd tcp6 0 0 :::9091 :::* LISTEN 1593/httpd [root@rhcsa ~]#(2):在 /var/www/html 下面创建这个hello.html文件并且写入指定内容;
[root@rhcsa html]# cat hello.html My Home Page is hello [root@rhcsa html]#(3):将访问apache服务器的首页修改为hello.html;
[root@rhcsa conf]# cat httpd.conf | grep hello.html DirectoryIndex hello.html [root@rhcsa conf]#(4):效果截图:
本文详细介绍了在Linux环境下配置Apache web服务器的过程,包括修改默认首页为hello.html,设置虚拟主机以ip100和ip200访问不同目录,以及配置不同端口的虚拟主机。此外,还探讨了SSL握手协议的四个阶段,确保数据传输的安全性。

最低0.47元/天 解锁文章

309

被折叠的 条评论
为什么被折叠?



