본문 바로가기

728x90

nginx

CentOS 8에서 Webalizer를 설치하는 방법 CentOS 8에서 Webalizer를 설치하는 방법 Webalizer는 웹 서버 로그를 분석하고 웹 사이트 트래픽을 시각화하는 데 사용되는 오픈 소스 웹 로그 분석 도구입니다. Webalizer는 다양한 유형의 웹 서버 로그를 지원하며, 다양한 시간 범위 및 요약 수준으로 웹 사이트 트래픽을 분석할 수 있습니다. Webalizer는 또한 웹 사이트 트래픽의 원천을 분석하고, 가장 인기 있는 웹 페이지를 식별하고, 각 웹 페이지의 평균 다운로드 시간을 계산할 수 있습니다. Webalizer를 사용하려면 먼저 웹 서버 로그를 Webalizer의 데이터베이스에 저장해야 합니다. Webalizer는 다양한 방법으로 웹 서버 로그를 가져올 수 있습니다. 가장 일반적인 방법은 Webalizer를 웹 서버에 설치하.. 더보기
NGINX와 PHP-FPM을 연동하여 PHP 스크립트를 처리하는 방법 NGINX와 PHP-FPM을 연동하여 PHP 스크립트를 처리하는 방법 1. NGINX 설치 https://sangchul.kr/754 2. PHP-FPM 설치 https://sangchul.kr/763 3. NGINX 설정 nginx(fastcgi_params) 설정 cat /etc/nginx/fastcgi_params fastcgi_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_params fastc.. 더보기
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.. 더보기

728x90