配置httpd服务实质上就是修改httpd服务的配置文件。html
一、httpd服务的主要配置文件以下图:linux
二、httpd服务主配置文件经常使用的参数及用途vim
[root@PC1linuxprobe conf]# vim /etc/httpd/conf/httpd.conf
(httpd服务主配置文件截图)网站
三、其中 主配置文件中 DocumentRoot参数定义的是 网站数据的保存路径spa
四、目前网站广泛的首页名称是 index.html,向 /var/www/html目录中写入 index.html文件前的httpd服务首页以下:3d
五、向 /var/www/html目录中写入默认的首页文件index.htmlrest
[root@PC1linuxprobe html]# echo aabb1122 > /var/www/html/index.html
查看写入index.html后首页是否改变,以下:code
六、修改httpd服务主配置文件/etc/httpd/conf/httpd.conf,将网站数据的保存路径修改问/home/wwwroothtm
首先建立目录,并新建首页文件:blog
[root@PC1linuxprobe html]# mkdir /home/wwwroot
[root@PC1linuxprobe html]# echo xxxxyyyyyyzzzz> /home/wwwroot/index.html
修改主配置文件/etc/httpd/conf/httpd.conf:
七、从新启动httpd服务,验证网站数据存储路径修改后的效果
[root@PC1linuxprobe html]# systemctl restart httpd
八、并无生效????以下图