Security in CPS/Networking
[아파치] 커스텀 모듈 빌드 및 로딩
mjune.kim
2019. 9. 4. 11:05
https://httpd.apache.org/docs/2.4/programs/apxs.html
Welcome! - The Apache HTTP Server Project
The Number One HTTP Server On The Internet The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient an
httpd.apache.org
1. 더미 모듈을 생성한다.
$> apxs -g -n {모듈명} $> ls -al {모듈명} {모듈명}/.deps {모듈명}/mod_{모듈명}.c {모듈명}/modules.mk {모듈명}/Makefile |
2. 커스텀 모듈을 apxs 로 빌드한다.
$> apxs -i -a -c mod_{모듈명}.c or $> sudo make all reload |
3. 아파치 서버를 재시작하여 변경사항을 적용한다.
$> sudo apachectl restart |
4. a2query 로 생성한 모듈이 load 되었는지 확인한다.
$> sudo a2query -m | grep {모듈명} |
5. 만약 해당 모듈이 enable 되지 않았다면 활성화시킨다.
$> sudo a2enmod {모듈명} |