httpd 3

기본 httpd reverse proxy 설정 (http, https)

Rocky Linux 9 에는 기본 openssl 3 이상이 설치되어 있음openssl 3이상으로 컴파일하면, TLS1.2~ 만 지원하므로,(필요 시)TLS1.0~1.3까지 지원하려면 openssl 1.1.1w 설치 후 이를 이용하도록 httpd (2.4.63등) 컴파일 필요※ /app/httpd 에 설치하는 것으로 가정 1) TLS1.0~1.3 (호환성) 을 위해 openssl 1.1.1w 이용 시wget https://www.openssl.org/source/openssl-1.1.1w.tar.gztar xvfz openssl-1.1.1w.tar.gzcd openssl-1.1.1wdnf install -y perl perl-core perl-FindBin./config --prefix=/usr/loca..

웹서버 log rolling (logrotate)

기본적인 httpd log 에 대한 6개월 보관 설정 예시 (오래된 것은 삭제)# vi /etc/logrotate.d/httpd/var/log/httpd/*log { weekly # 로그 파일을 주 단위로 회전 rotate 24 # 24주(약 6개월) 동안 로그를 보관 missingok # 로그 파일이 없더라도 오류 무시 notifempty # 로그가 비어있으면 회전하지 않음 compress # gzip 압축하여 저장 (.gz) delaycompress # 가장 최근 파일은 압축하지 않음 sharedscripts # 여러 개의 ..

웹서버_WAS 2025.04.03

Apache 웹서버 공격 자동 차단

1. fail2ban 설치 (CentOS 7 / fail2ban v0.11.2 기준)$ sudo ym instsall epel-release$ sudo yum install fail2ban fail2ban-systemd 2. 기본 설정$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local 3. /etc/fail2ban/jail.local 에 설정 추가$ sudo vi /etc/fail2ban/jail.local...[httpd-dos]enabled = true#port = http,httpsfilter = httpd-doslogpath = /var/log/httpd/access_logmaxretry = 100findtime = 10bantime = 60a..