httpd 썸네일형 리스트형 CentOS 7에 Apache2의 확장 모듈인 Evasive를 설치하는 방법 CentOS 7에 Apache2의 확장 모듈인 Evasive를 설치하는 방법 EPEL 저장소 설치 yum install -y epel-release 필수 패키지 설치 yum install -y httpd httpd-devel Evasive 모듈 설치 yum install -y mod_evasive Evasive 활성화 및 설정 vim /etc/httpd/conf.d/mod_evasive.conf LoadModule evasive20_module /usr/lib64/httpd/modules/mod_evasive20.so apachectl -M | egrep evasive $ apachectl -M | egrep evasive evasive20_module (shared) Evasive 모듈에 대한 설정 m.. 더보기 Let's Encrypt에서 DNS 모드로 SSL 인증서를 발급받는 방법 Let's Encrypt에서 DNS 모드로 SSL 인증서를 발급받는 방법 DNS 모드는 도메인 소유권 검증을 DNS 레코드를 통해 처리하는 방식입니다. EPEL 패키지 설치 yum install -y epel-release 1. Certbot 설치 Certbot을 설치합니다. CentOS 7의 경우 다음과 같이 수행할 수 있습니다. sudo yum install certbot python2-certbot-nginx 설치된 패키지는 시스템에 따라 다를 수 있습니다. 2. DNS API 키 준비 DNS 모드로 SSL 인증서를 발급받기 위해서는 해당 DNS 제공업체의 API 키가 필요합니다. Certbot이 DNS 레코드를 자동으로 추가하고 수정하도록 하기 위함입니다. DNS 제공업체별로 다양한 설정이 필요하.. 더보기 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.. 더보기 HTTP Status Codes HTTP Status Codes(HTTP 1.1 : RFC 2616)상태코드는 서버가 요구 메시지를 수신하여 처리한 결과를 알려주는 세 자리의 정수로 된 처리 결과 번호입니다.첫 번째 자리 숫자는 응답의 종류에 대한 분류 기호이며 나머지 두 자리 숫자는 일련번호입니다. 현재 첫 번째 자리 숫자에 대해 다섯 가지로 분류하여 쓰고 있습니다.1xx (정보 제공)100 Continue : 요청의 초기 부분이 수신되었으며 클라이언트는 나머지 요청을 계속 보낼 수 있습니다.101 Switching Protocols : 서버가 클라이언트의 프로토콜 변경 요청을 수락했음을 나타냅니다.2xx (성공)200 OK : 요청이 성공적으로 처리되었으며 서버가 요청한 데이터를 포함하여 응답합니다.201 Created : 요청에 .. 더보기 [리눅스] phpmyadmin 설치 패키지 정보 mysql-5.1.50 httpd-2.2.16 php-5.2.14 ZendOptimizer-3.3.3 phpMyAdmin-3.3.7 라이브러리 설치 # yum -y install gd gd-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel libxml2 libxml2-devel openssl openssl-devel mhash mhash-devel MySQL # useradd -m -c "MySQL Server" -d /usr/local/mysql -s /bin/false -u 27 mysql # ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/m.. 더보기 [Apache] apache(httpd-2.2.12) 설치 apache(httpd-2.2.12) 설치 ver : httpd-2.2.12 # useradd -c "Apache" -u 48 -s /sbin/nologin -m -d /home/www apache # ./configure --prefix=/usr/local/apache2 --enable-so --enable-shared=max --enable-rewrite --enable-ssl --enable-proxy # make # make install # cp -p /usr/local/apache2/bin/apachectl /etc/init.d/httpd # vi /etc/init.d/httpd ----------------------------------------------------------------.. 더보기 아파치 서버의 로그 저장 스크립트 아파치 서버의 로그 저장 스크립트 이 스크립트는 Apache 웹 서버의 액세스 로그 및 에러 로그를 매일 로테이트하여 지난 3일 간의 로그를 보관하고, 오래된 로그를 삭제하는 기능을 수행합니다. vim apache_log_rotate.sh #!/bin/bash # Script Name: apache_log_rotate.sh # Description: Rotate Apache web server logs and remove old logs C_DATE=$(date +%Y-%m-%d) LAST_DATE=$(date +%Y-%m-%d --date '3 days ago') SITES=$(grep ServerName /usr/local/apache2/conf/extra/httpd-vhosts.conf | grep.. 더보기 아파치 서버의 로그 삭제 스크립트 아파치 서버의 로그 삭제 스크립트 이 스크립트는 /var/logs 디렉터리에서 2일 이전에 수정된 파일을 찾아 삭제하는 역할을 합니다. vim cleanup_old_logs.sh #!/bin/bash # Script Name: cleanup_old_logs.sh # Description: Remove files in /var/logs that are older than 2 days cd /var/logs # Remove files modified more than 2 days ago find . -type f -mtime +2 -exec /bin/rm -f {} \; 주요 내용 cd /var/logs : 스크립트가 작업을 수행할 디렉터리로 이동합니다. find . -type f -mtime +2 -exe.. 더보기 이전 1 2 다음