编号 | 命令 | 说明 |
1 | rpm -qa|grep httpd | 查看是否安装 |
2 | yum -y install httpd-devel | 安装 |
3 | which apxs | 查看是否安装成功 |
4 | apxs -g -n helloworld | 创建模块 |
5 | apxs -c mod_helloworld.c | 编译 |
6 | apxs -i mod_helloworld.la | 添加到apache module中 |
7 | //配置 LoadModule helloworld_module /usr/lib/httpd/modules/mod_helloworld.so <Location /helloworld> SetHandler helloworld </Location> |