首页 > 代码库 > apache 部署helloworld

apache 部署helloworld

1,安装gcc,apache, apxs

yum install gcc  httpd  httpd-devel

2,apxs -g -n helloword

3,apxs -c mod_helloworld.c

4,apxs -i mod_helloworld.la

生成了mod_helloworld.so文件在

/usr/lib64/httpd/modules目录下

修改http.conf文件

添加

LoadModule helloworld_module /usr/lib64/httpd/modules/mod_helloworld.so

<Location /helloworld>
        SetHandler helloworld
</Location>

restart apache

$service  httpd stop/systemctl stop httpd.service

$service httpd start /systemctl start httpd.service

 

apache 部署helloworld