본문 바로가기

반응형

httpd

아파치 서버의 로그 삭제 스크립트 아파치 서버의 로그 삭제 스크립트 이 스크립트는 /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.. 더보기
[리눅스] 아파치 443 포트 올리기 아파치 443 포트 올리기 아파치(Apache) 웹 서버에서 443 포트를 사용하여 SSL/TLS 암호화된 연결을 지원하려면 다음 단계를 따를 수 있습니다. 1. SSL/TLS 인증서 가져오기 443 포트를 사용하여 HTTPS 연결을 설정하려면 유효한 SSL/TLS 인증서가 필요합니다. 인증서는 인증기관(Certificate Authority)에서 구매하거나 Let's Encrypt와 같은 무료 인증 기관을 통해 얻을 수 있습니다. 인증서를 얻은 후 .crt 및 .key 파일로 저장합니다. 2. Apache SSL 모듈 활성화 Apache에서 SSL을 사용하려면 SSL 모듈을 활성화해야 합니다. sudo a2enmod ssl 명령을 사용하여 SSL 모듈을 활성화합니다. 3. 가상 호스트 구성 Apache.. 더보기
CentOS Net Install을 통한 설치 CentOS NET INSTALL 설치하기 1. ISO 이미지 다운로드 CentOS 공식 웹사이트에서 Net Install ISO 이미지를 다운로드합니다. 2. 부팅 가능한 USB 드라이브 생성 또는 굽기 ISO 이미지를 부팅 가능한 USB 드라이브에 쓰거나, DVD에 굽습니다. 3. 부팅 및 설치 시작 컴퓨터를 부팅 가능한 USB 드라이브 또는 굽은 DVD로 부팅합니다. 부팅이 시작되면 설치 옵션을 선택하고 엔터를 눌러 설치 프로세스를 시작합니다. 4. 설치 언어 및 설정 Choose a Language (Korean) Keyboard Type (us) 5. 네트워크 설치 URL Installation Method (HTTP) 6. 네트워크 설정 Configure TCP/IP 7. HTTP 설정 Web.. 더보기
[Cacti] cacti 설치1 APM 설치 1. apache 설치 # yum -y install httpd 2. mysqㅣ 설치 # yum -y install mysql mysql-server mysql-devel 3. 필요 라이브러리 설치 # yum -y install gd gd-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel fontconfig fontconfig-devel libxml2 libxml2-devel openssl openssl-devel gmp gmp-devel mhash mhash-devel libmcrypt libmcrypt-devel 4. php 및 php-mysql 연동 설치 # yum -y install php php-mysql.. 더보기
[apache][ERROR] apache Warning: DocumentRoot [/home/www/****] does not exist Apache 구동 시 error [root@scbyun-ns1 named]# service httpd restart httpd 를 정지 중: [ OK ] httpd (을)를 시작 중: Warning: DocumentRoot [/home/www/docs/www.scbyun.com] does not exist [ OK ] messages 로그 error [root@scbyun-ns1 named]# Oct 9 14:02:19 scbyun-ns1 setroubleshoot: SELinux is preventing the httpd from using potentially mislabeled files (./docs). For complete SELinux messages. run sealert -l f5fd0e.. 더보기
[apache][ERROR] httpd: Could not reliably determine the server's fully qualified domain name [root@ns1 src]# apachectl start httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName 해결 방법 (원본) #ServerName www.example.com:80 (수정) ServerName 127.0.0.1:80 더보기

728x90
반응형