본문 바로가기

반응형

아파치

우분투에 qos mod를 설치하고 설정하는 방법(mod_qos) 우분투에 qos mod를 설치하고 설정하는 방법(mod_qos) mod_qos는 Apache 웹 서버에서 품질 서비스(QoS)를 제공하는 모듈로 대역폭 제어, 연결 수 제한, 요청 속도 제한 등 다양한 기능을 제공합니다. APT 저장소 업데이트 sudo apt-get update Apache 설치 sudo apt-get install -y apache2 /usr/sbin/apache2 -v $ /usr/sbin/apache2 -v Server version: Apache/2.4.52 (Ubuntu) Server built: 2023-10-26T13:44:44 mod_qos를 컴파일하여 설치하기 더보기 --- sudo apt-get install -y apache2 apache2-dev build-esse.. 더보기
아파치(Apache 2.4) 웹 서버에서 Protocols 지시자를 적용하는 방법 아파치(Apache 2.4) 웹 서버에서 Protocols 지시자를 적용하는 방법 아파치(Apache 2.4) 웹 서버에서 Protocols 지시자를 적용하는 방법은 다음과 같습니다. 1. 터미널을 열고 아파치의 설정 파일을 엽니다. 일반적으로 /etc/httpd/conf/httpd.conf 또는 /etc/httpd/conf.d/ssl.conf와 같은 경로에 위치합니다. 2. 설정 파일에서 또는 섹션을 찾습니다. 이 섹션은 SSL/TLS 인증서가 설정된 가상 호스트를 의미합니다. 3. 아래 코드를 해당 섹션에 추가합니다. Protocols [프로토콜1] [프로토콜2] ... 여기서 [프로토콜1], [프로토콜2] 등은 사용하고자 하는 프로토콜을 지정합니다. 예를 들어, h2와 http/1.1을 모두 사용하.. 더보기
[리눅스] ab(Apache Bench) tools 에러 ab(Apache Bench) 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.. 더보기
[리눅스] 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 default page) 편집 아파치 디폴트 페이지(apache default page) 편집 아파치 패키지 설치 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 Direct.. 더보기
[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.. 더보기
Apache Method 예외처리 Apache Method 예외처리 HTTP는 요청 메서드를 정의하여, 주어진 리소스에 수행하길 원하는 행동을 나타냅니다. 간혹 요청 메서드를 "HTTP 동사"라고 부르기도 합니다. 각각의 메서드는 서로 다른 의미를 구현하지만, 일부 기능은 메서드 집합 간에 서로 공유하기도 합니다. 이를테면 응답 메서드는 안전하거나, 캐시 가능하거나, 멱등성을 가질 수 있습니다. GET GET 메서드는 특정 리소스의 표시를 요청합니다. GET을 사용하는 요청은 오직 데이터를 받기만 합니다. HEAD HEAD 메서드는 GET 메서드의 요청과 동일한 응답을 요구하지만, 응답 본문을 포함하지 않습니다. POST POST 메서드는 특정 리소스에 엔티티를 제출할 때 쓰입니다. 이는 종종 서버의 상태의 변화나 부작용을 일으킵니다. .. 더보기
Apache 2.4 Invalid command 'LanguagePriority' Apache 2.4 Invalid command 'LanguagePriority' 에러 $ /usr/local/apache2/bin/apachectl -t AH00526: Syntax error on line 78 of /usr/local/apache2/conf/extra/httpd-languages.conf: Invalid command 'LanguagePriority', perhaps misspelled or defined by a module not included in the server configuration Invalid command 'LanguagePriority' 오류는 Apache 2.4에서 LanguagePriority 디렉티브를 사용할 때 발생할 수 있습니다. 이 오류는 Apach.. 더보기

728x90
반응형