리눅스 썸네일형 리스트형 아파치(Apache) 웹 서버에서 서버 정보 페이지를 설정하는 방법 아파치(Apache) 웹 서버에서 서버 정보 페이지를 설정하는 방법 Apache 웹 서버에서 서버 정보 페이지를 설정하려면 mod_status 모듈을 사용해야 합니다. mod_status 모듈은 Apache의 현재 실행 상태에 대한 정보를 제공합니다. 1. mod_status 모듈 활성화 vim /etc/httpd/conf.modules.d/00-base.conf LoadModule status_module modules/mod_status.so 2-1. mod_status 옵션 설정 mod_status 모듈의 옵션을 설정해야 합니다. Apache의 전역 설정 파일(httpd.conf)에서 수정합니다. vim /etc/httpd/conf/httpd.conf # Supplemental configurati.. 더보기 아파치 웹 서버에서 IP로 접속을 차단하는 방법 아파치 웹 서버에서 IP로 접속을 차단하는 방법 아파치에서 IP로 접속을 차단하는 몇 가지 방법입니다. 1 .htaccess 파일을 사용하여 IP 차단 웹 서버의 루트 디렉토리 또는 해당 디렉토리에 .htaccess 파일을 생성합니다. 다음과 같은 내용을 .htaccess 파일에 추가하여 특정 IP 주소 또는 IP 대역을 차단합니다. order allow,deny deny from 192.168.0.1 deny from 10.0.0.0/24 allow from all 2 httpd.conf 또는 apache2.conf 파일을 사용하여 IP 차단 웹 서버의 httpd.conf 또는 apache2.conf 파일을 엽니다. 다음과 같은 내용을 파일에 추가하여 특정 IP 주소 또는 IP 대역을 차단합니다. Or.. 더보기 아파치 디폴트 페이지(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.. 더보기 CentOS 7에서 SELinux를 비활성화하는 방법(selinux disabled) CentOS 7에서 SELinux를 비활성화하는 방법(selinux disabled)SELinux는 CentOS의 기본 보안 기능 중 하나입니다. 하지만 때로는 특정 애플리케이션이나 설정에서 SELinux를 비활성화해야 할 때도 있습니다. 이를 위해 다음과 같은 단계를 따를 수 있습니다.1. SELinux 상태 확인현재 SELinux의 상태를 확인합니다.sestatus위 명령을 실행하면 현재 SELinux 상태가 enforcing, permissive, disabled 중 하나로 나타납니다.enforcing : SELinux가 활성화되어 있고 보안 정책을 강제로 적용합니다.permissive : SELinux가 활성화되어 있지만 보안 정책을 적용하지 않습니다. 대신 정책 위반에 대한 경고 메시지가 로그에.. 더보기 ntpstat 명령어 ntpstat 명령어ntpstat는 NTP(Network Time Protocol) 동기화 상태를 간단히 확인할 수 있는 유용한 명령어입니다. 주로 NTP 서버 또는 클라이언트의 동기화 여부, 시간 오차 등을 빠르게 점검할 때 사용됩니다.ntpstat 설치dnf install -y ntpstatntpstat --versionntpstat 실행ntpstat성공적인 동기화 상태synchronised to NTP server (203.248.240.140) at stratum 4 time correct to within 22 ms polling server every 1024 ssynchronised to NTP server : 특정 NTP 서버(203.248.240.140)와 동기화됨.stratum .. 더보기 [명령어] which, whereis, locate 명령어 which, whereis, locate 명령어 - 명령어 위치을 찾는 명령어 which 명령어 : 명령의 전체 경로를 보여준다 $ which ls alias ls='ls --color=auto' /usr/bin/ls $ which ifconfig /usr/sbin/ifconfig whereis 명령어 : 명령의 실행파일, 소스, 매뉴얼 페이지가 어디 있는지 보여준다. $ whereis ls ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.gz $ whereis ifconfig ifconfig: /usr/sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz ###실행 파일만 찾는다 $ where.. 더보기 [리눅스] CentOS7에서 시스템 메시지 로그 필터링 CentOS7에서 시스템 메시지 로그 필터링 Environment $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) Issue /var/log/messages tail -f /var/log/messages $ tail -f /var/log/messages Dec 18 12:15:01 bvm-24 systemd: Started Session 6988 of user root. Dec 18 12:20:01 bvm-24 systemd: Started Session 6989 of user root. Dec 18 12:25:01 bvm-24 systemd: Started Session 6990 of user root. Dec 18 12:25:40 bvm.. 더보기 [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 ··· 113 114 115 116 117 118 119 ··· 182 다음