httpd部署

1. 安装httpd服务

dnf install httpd -y

2. 管理httpd服务

启动服务:

systemctl start httpd

开机自启:

systemctl enable httpd

查看状态:

systemctl status httpd

停止服务:

systemctl stop httpd

禁用开机自启:

systemctl disable httpd

3. 配置文件管理

主配置文件:/etc/httpd/conf/httpd.conf

辅助配置目录:/etc/httpd/conf.d/

检查语法:

apachectl configtest

重启生效配置:

systemctl restart httpd

4. 加载asis模块

编辑配置文件:

vim /etc/httpd/conf.modules.d/00-optional.conf

取消注释行:

LoadModule asis_module modules/mod_asis.so

重启服务:

systemctl restart httpd

验证模块:

httpd -M | grep asis

5. 配置SSL支持

安装mod_ssl:

dnf install mod_ssl -y

重启服务:

systemctl restart httpd

验证SSL模块:

httpd -M | grep ssl

6. 验证服务

获取服务器IP:

ip a

Linux终端验证:

curl http://192.168.183.131

浏览器验证:访问http://192.168.183.131

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值