当前位置:首页>维修大全>综合>

linux怎么搭建web服务器

linux怎么搭建web服务器

更新时间:2023-09-18 01:59:57

linux怎么搭建web服务器

web服务器的简单搭建1、安装一个可以提供web服务的软件yum -y install httpd2、 启动httpd服务systemctl start httpd3、进入主配置文件vim /etc/httpd/conf/httpd.conf在此范围内添加或删除设置,为了方便编写,编辑了一个子配置文件/etc/httpd/conf.d/httpd-vhosts.conf4、 编辑子配置文件vim /etc/httpd/conf.d/httpd-vhosts.conf 此路径必为conf.d/*.conf (意:为.conf 后缀命名)systemctl restart httpd 重启服务5、 编辑页面测试文件在web服务中默认存放网页文件的路径:/var/ chaodiquan.com /html默认网页文件名字:index.html6、 浏览器测试ifconfig ens33 查看ens33网卡的地址在浏览器里面 输入你的IP就可以看到测试文件里 希望可以帮助到的哈!

更多栏目