nginx 썸네일형 리스트형 Nginx와 Tomcat 클러스터를 구성하는 방법 Nginx와 Tomcat 클러스터를 구성하는 방법 Nginx를 로드 밸런서로 사용하여 여러 Tomcat 인스턴스를 클러스터링하는 방식입니다. 각 Tomcat 인스턴스는 서로 다른 Receiver 포트 및 AJP 포트를 사용하여 구성됩니다. 호스트 이름 IP 주소 엔진(인스턴스 이름) 포트 kube-node1 192.168.0.61 nginx 80 kube-node2 192.168.0.62 tomcat(instance1) 8082, 8005 kube-node2 192.168.0.62 tomcat(instance2) 8083, 8006 kube-node3 192.168.0.63 tomcat(instance1) 8082, 8005 kube-node3 192.168.0.63 tomcat(instance2) 80.. 더보기 Nginx의 액세스 로그에서 공격자 IP(attacker ip) 주소를 추출하는 방법 Nginx의 액세스 로그에서 공격자 IP(attacker ip) 주소를 추출하는 방법 tail -n 10000 access.log | awk '{print $1}' | sort | uniq -c | sort -nr | head -n 10 $ tail -n 10000 /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -nr | head -n 10 554 111.111.111.111 210 222.222.222.222 57 222.222.222.223 56 222.222.222.224 50 222.222.222.225 48 222.222.222.226 48 222.222.222.227 45 222.222.222.228 44 222.22.. 더보기 [linux] How To Install GoAccess on CentOS 8 How To Install GoAccess on CentOS 8 install goaccess $ yum install -y goaccess goaccess version infomation $ goaccess --version GoAccess - 1.5.4. For more details visit: https://goaccess.io/ Copyright (C) 2009-2020 by Gerardo Orellana Build configure arguments: --enable-debug --enable-utf8 --enable-geoip=legacy --with-getline --with-openssl goaccess execution $ goaccess access.log --log-format=C.. 더보기 CentOS 8에서 Webalizer를 설치하는 방법 CentOS 8에서 Webalizer를 설치하는 방법 Webalizer는 웹 서버 로그를 분석하고 웹 사이트 트래픽을 시각화하는 데 사용되는 오픈 소스 웹 로그 분석 도구입니다. Webalizer는 다양한 유형의 웹 서버 로그를 지원하며, 다양한 시간 범위 및 요약 수준으로 웹 사이트 트래픽을 분석할 수 있습니다. Webalizer는 또한 웹 사이트 트래픽의 원천을 분석하고, 가장 인기 있는 웹 페이지를 식별하고, 각 웹 페이지의 평균 다운로드 시간을 계산할 수 있습니다. Webalizer를 사용하려면 먼저 웹 서버 로그를 Webalizer의 데이터베이스에 저장해야 합니다. Webalizer는 다양한 방법으로 웹 서버 로그를 가져올 수 있습니다. 가장 일반적인 방법은 Webalizer를 웹 서버에 설치하.. 더보기 [draft] NGINX와 PHP-FPM을 연동하여 PHP 스크립트를 처리하는 방법 NGINX와 PHP-FPM을 연동하여 PHP 스크립트를 처리하는 방법1. NGINX 설치https://sangchul.kr/754 2. PHP-FPM 설치https://sangchul.kr/7633. NGINX 설정nginx(fastcgi_params) 설정cat > /etc/nginx/fastcgi_paramsfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;fastcgi_param PATH_INFO $fastcgi_path_info;EOF(or)vim /etc/nginx/fastcgi_para.. 더보기 CentOS 7에서 NGINX의 최신 버전을 설치하는 방법 CentOS 7에서 NGINX의 최신 버전(안정 버전)을 설치하는 방법 nginx : High performance web server RHEL and derivatives : http://nginx.org/en/linux_packages.html#RHEL-CentOS 테스트 환경 운영체제 버전 정보 $ cat /etc/os-release | grep PRETTY_NAME | cut -d '"' -f 2 CentOS Linux 7 (Core) NGINX 설치 EPEL 저장소 및 YUM Utilities 패키지 설치 yum install -y epel-release yum-utils nginx.repo 파일 생성 sudo tee /etc/yum.repos.d/nginx.repo 더보기 NGINX 특정 파일이나 디렉토리를 제외한 모든 연결을 제한 NGINX 특정 파일이나 디렉토리를 제외한 모든 연결을 제한 모든 연결 제한(나머지 요청 301 리다이렉트) location / { return 301 https://sangchul.kr; } 특정 파일이나 디렉터리(health_check.html 파일) 접근 허용 location ~ ^/health_check.html { #access_log off; access_log /var/log/nginx/elb-healthchecker-access.log main; } default.conf 파일 $ vim /etc/nginx/conf.d/default.conf # Settings for a HTTP enabled server. server { listen 80; server_name _; root /usr/.. 더보기 취약점을 방지하기 위한 보안 HTTP 헤더를 설정하기 취약점을 방지하기 위한 보안 HTTP 헤더를 설정하기 X-Content-Type-Options ###Apache Header set X-Content-Type-Options nosniff ###Nginx add_header X-Content-Type-Options nosniff; X-XSS-Protection ###Apache Header set X-XSS-Protection "1; mode=block" ###Nginx add_header X-XSS-Protection "1; mode=block"; X-Frame-Options ###Apache Header always append X-Frame-Options DENY ###Nginx add_header X-Frame-Options “DENY”; HTTP.. 더보기 이전 1 2 3 4 5 다음