
1. 패키지 설치
# yum -y install httpd mod_ssl
2. 서버 설정
/etc/httpd/conf/httpd.conf -> 주 설정 파일
/etc/httpd/conf.d/*.conf -> 하위 설정 파일
/var/www/html/*
3. 서비스 기동
# systemctl enable --now httpd
4.방화벽 등록
# firewall-cmd --premanent --add-service={http,https}
5. SELinux(?)
[EX] WEB 기본 설정 점검
[EX] WEB 클라이언트 프로그램
[EX] WEB 관리자 웹페이지 설정
# vi /etc/httpd/conf/httpd.conf
ServerAdmin webmaster@example.com
ServerName www.example.com:80
# systemctl enable --now httpd
[EX] WEB 사용자 웹페이지 설정


# vi /etc/httpd/conf.d/userdir.conf
UserDir public_html -> 위에 뭐 주석처리해줘야댐
Alias /user01 /home/user01/public_html
# systemctl restart httpd
# su - user01
$ chmod 711 .
$ mkdir public_html
$ banner hello > public_html/index.html
[EX] CGI 구성
[EX] 가상호스트 설정 - Name-based Virtual Hosting
하나의 웹서버에 여러 웹서버 구성 가능
[EX] 가상호스트 설정 - IP-based Virtual Hosting
[EX] 가상호스트 설정 - Port-based Virtual Hosting
[EX] 웹서버 정보/상태 확인 웹페이지 구성 ->.htaccess로 보호 필요
http://www.example.com/server-info
http://www.example.com/server-status
[EX] 웹서버 통계 정보 확인 웹페이지 구성 ->.htaccess로 보호 필요
# curl --head http://www.example.com
=> Server: Apache
Firewall -> IPS -> IDS -> WAF(Web Application Firewall) -> web
ACL 종류: F/W, Anti-DDoS, IPS/IDS, WAF
용어: 오탐(오인탐지), 과탐 -> 규칙을 조장할 수 있어야한다.
WAF: 웹 방화벽
- webknight
- modsecurity
무료 웹 취약점 진단 서비스
https://www.boho.or.kr/kr/apply/list.do?menuNo=205003
실습
1) DB (mariadb)
웹 3-tier 아키텍처
2) Nginx

[참고] 웹 프록시(Proxy)