修改apache默认页面方法

 时间:2024-10-12 07:10:39

1、先使用yum安装apache服务yum install httpd -y

修改apache默认页面方法

2、启动apache服务systemctl start httpd并本地测试访问

修改apache默认页面方法

3、通过命令ps -ef|grep httpd 找到apache的进程/usr/sbin/httpd

修改apache默认页面方法

4、/usr/sbin/httpd -V这样就能查找配置文件的路径了-D HTTPD_ROOT="/etc/httpd"-D SERVER_CONFIG_FILE="conf/httpd.conf

修改apache默认页面方法

5、欢迎配置页面/etc/httpd/conf.d/welcome.conf对应的目录路径为/usr/share/httpd/noindex

修改apache默认页面方法

6、修改/usr/share/httpd/noindex下面的index.html页面内容

修改apache默认页面方法

7、重置页面内容并测试[root@localhost noindex]# echo "192.168.122.157" > index.html[root@localhost noindex]# curl 127.0.0.1192.168.122.157

修改apache默认页面方法

8、浏览器中测试,出现ip地址表明修改默认页面成功

修改apache默认页面方法
  • linux修改目录下所有文件777
  • linux如何删除文件
  • vim怎么退出
  • linux返回上一级目录的命令
  • Linux移动文件
  • 热门搜索
    感恩生命手抄报 诗情画意手抄报 读书手抄报版面设计 传统文化手抄报资料 小学五年级手抄报 有关节约用水的手抄报 感恩教育手抄报内容 建党95周年手抄报 知识树手抄报 孝敬父母手抄报图片