Apache 썸네일형 리스트형 [리눅스] Apache2 확장 모듈 evasive(evasive20_module) 설치 Apache2 확장 모듈 evasive(evasive20_module) 설치 yum 설치 epel 설치 $ yum install -y epel-release httpd 설치 $ yum install -y httpd mod_evasive 모듈 설치 $ yum install -y mod_evasive 모듈 확인 $ apachectl -M | egrep evasive evasive20_module (shared) mod_evasive.conf 원본 파일 $ cat /etc/httpd/conf.d/mod_evasive.conf # mod_evasive configuration LoadModule evasive20_module modules/mod_evasive24.so # The hash table size d.. 더보기 [linux] How To Install webalizer on CentOS 8 How To Install webalizer on CentOS 8 webalizer - A flexible Web server log file analysis program installation environment $ cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core) $ getconf LONG_BIT 64 install webalizer $ yum install -y webalizer webalizer package contents $ rpm -ql webalizer /etc/cron.daily/00webalizer /etc/httpd/conf.d/webalizer.conf /etc/sysconfig/webalizer /etc/webalize.. 더보기 [용어] RPS(Request Per Second) RPS(Request Per Second) : 초당 접속자 수 Request Per Second (RPS)는 일정 시간 동안 수신한 요청(Request)의 총 개수를 초(second) 단위로 나눈 것으로, 단위 시간당 처리할 수 있는 요청의 수를 나타내는 지표입니다. 일반적으로 웹 서버나 API 서버에서 RPS는 서비스의 성능을 측정하는 중요한 지표 중 하나입니다. 클라이언트에서 서버로 보내는 요청의 수가 많을수록 높은 RPS를 달성하기 위해서는 서버가 빠르게 요청을 처리하고 응답을 반환해야 합니다. 따라서, RPS는 서버의 성능을 측정하고 최적화하는 데 중요한 지표입니다. 예를 들어, 웹 서버에서 1초 동안 1000개의 요청을 처리했다면, 해당 웹 서버의 RPS는 1000입니다. 이는 웹 서버가 1초 .. 더보기 [http] ab tools 에러 ab tools 에러 ab 명령어 Usage: ab [options] [http[s]://]hostname[:port]/path Options are: -n requests Number of requests to perform (= 요청수) -c concurrency Number of multiple requests to make at a time (=동시 요청수(사용자)) -t timelimit Seconds to max. to spend on benchmarking This implies -n 50000 -s timeout Seconds to max. wait for each response Default is 30 seconds ab 에러 $ ab -c 10000 -n 1000 http://loca.. 더보기 [리눅스] apache, php 메모리 모니터링 명령어 apache, php 메모리 모니터링 명령어 apache 모니터링 아파치 메모리 사용량 ps -ylC httpd | awk '{x += $8;y += 1} END {print "Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}' $ ps -ylC httpd | awk '{x += $8;y += 1} END {print "Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}' Memory Usage (MB): 1618.67 Average Proccess Size (MB): 323.734 아파치 프로세스 개수 $ ps -ef |.. 더보기 [리눅스] Apache 로그 logrotate(로테이드) 설정 Apache 로그 logrotate(로테이드) 설정 apache logrotate 파일 편집 vim /etc/logrotate.d/apache $ vim /etc/logrotate.d/apache /logs/access/*-access-*.log /logs/error/*-error-*.log { daily rotate 7 notifempty missingok compress delaycompress sharedscripts postrotate /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } logrotate 실행 /sbin/logrotate -f /etc/logrotate.d/.. 더보기 [Apache] 디폴트 페이지 편집 Apache 디폴트 페이지 편집 환경 $ dnf install -y httpd $ httpd -v Server version: Apache/2.4.37 (centos) Server built: Sep 15 2020 15:41:16 welcome(welcome.conf) 페이지 편집 $ vim /etc/httpd/conf.d/welcome.conf Options -Indexes #ErrorDocument 403 /noindex/index.html ErrorDocument 403 http://www.sangchul.kr/40x.html Alias /noindex /usr/share/httpd/noindex Options MultiViews DirectoryIndex index.html AddLanguage .. 더보기 [Apache] 웹서버에서 http를 https(SSL)로 리다이렉트하는 방법 웹서버에서 http를 https(SSL)로 리다이렉트하는 방법 rewrite 모듈 활성화 LoadModule rewrite_module modules/mod_rewrite.so ###httpd.conf $ vim httpd.conf LoadModule rewrite_module modules/mod_rewrite.so 모듈 확인 httpd -M $ httpd -M | egrep -i rewrite rewrite_module (shared) 가상호스트 설정 httpd-vhosts.conf 편집 RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] $ vim httpd-vhos.. 더보기 이전 1 2 3 4 5 다음