apache 部署helloworld

1,Install gcc  apxs  apache

$yum install gcc httpd httpd-devel

2,create helloword module

$cd helloworld

3,create mod_helloworld.so file

$apxs -g -n helloword

$apxs -c mod_helloworld.c

$apxs -i mod_helloworld.la

It will create  mod_helloworld.so under /usr/lib64/httpd/modules directory

4,update httpd.conf file

$,cd /etc/httpd/conf/

update http.conf file

Add content as follows:

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

<Location /helloworld>
         SetHandler helloworld
</Location>

5,restart apache

$service httpd stop

$service httpd start

6,config tunnal    between windows and linux

map local port 8090 to remote 80 port

http://127.0.0.1:8090/helloworld

 

默认访问路径作为:/var/www/html

posted @ 2014-08-29 18:29  oyaimj  阅读(366)  评论(0编辑  收藏  举报