'분류 전체보기'에 해당되는 글 2491건
- 2020.11.17 JMeter ppt
- 2020.11.17 Jenkins 외부 jar 추가하기
- 2020.11.17 Django로 Pinterest 따라하기!
- 2020.11.17 tomcat heap size 설정
- 2020.11.16 [CentOS7] Minimal 버전 설치 이후
- 2020.11.16 [CentOS7] Tomcat 설치 및 설정
- 2020.11.16 java.lang.VerifyError: Inconsistent stackmap frames 오류 해결
- 2020.11.16 리눅스 성능 측정 sysbench 사용법
- 2020.11.16 [톰캣] Tomcat 서버 로그(log)파일인 catalina.out을 날짜별로 생성되도록 수정하기
- 2020.11.13 input validation and representation fortify java 1
- 2020.11.13 maven-surefire-plugin 에러
- 2020.11.13 Unreleased Resource
- 2020.11.12 공개SW를 활용한 소프트웨어 개발보안 점검가이드(2016.02.)
- 2020.11.12 jenkins 를 통한 소스코드 진단하기
- 2020.11.12 spring annotation-driven 시 bean name 중복(충돌,conflicts) 해결
- 2020.11.12 java 시큐어코딩 가이드
- 2020.11.11 null 포인터 역참조(null Pointer Dereference)
- 2020.11.09 [JAVA] Secure 코딩, 취약점 해결, 보안을 위한 방법 정리
- 2020.11.09 HP Fortify Static Code Analyzer
- 2020.11.09 WiKi Security Corporation
- 2020.11.03 Active X 대체 기술 Custom URL Schemes
- 2020.11.02 redirect 값 전달 RedirectAttributes 의 유의사항
- 2020.11.02 한국인터넷진흥원(KISA) 기술안내서 가이드 (시큐어 코딩 가이드 etc)출처
- 2020.10.31 jdk-6u45-linux-x64.bin error while loading shared libraries: libnsl.so.1
- 2020.10.28 커스텀 브라우저 프로토콜로 응용프로그램 실행 - custom url schemes in windows
- 2020.10.28 크롬(chrome)에서 로컬 exe파일 실행하는 방법(ActiveX 대체)[출처] 크롬(chrome)에서 로컬 exe파일 실행하는 방법(ActiveX 대체)|작성자 Marie
- 2020.10.27 Weblogic administration console way too slow
- 2020.01.30 docker mysql 올리기
- 2019.04.29 centos mariadb datadir
- 2019.04.10 How to optimize Apache performance on CentOS 7
[Linux] 리눅스 tomcat heap memory 확인 및 설정
오늘은 tomcat heap memory 확인 및 설정 방법에 대해 포스팅 하겠습니다. heap memory를 확인하고 설정하는 이유는 tomcat이 실행되다가 GC(Garbage Collector)가 사용하는 heap memory를 모두 사용하여 memory l..
bono915.tistory.com
Tomcat 메모리 설정
Linux vim catalina.sh > JAVA_OPTS="$JAVA_OPTS -Xms256m -Xmx512m -XX:MaxPermSize=128m" Xms: 최초 JVM 이 로드될 때 부여할 메모리 Xmx: 최대 JVM 이 가질 수 있는 메모리 MaxPermS..
mycup.tistory.com
톰캣 Tomcat 메모리설정 java.lang.OutOfMemoryError : PermGen space 에러
톰캣 Tomcat 메모리설정 java.lang.OutOfMemoryError : PermGen space 에러 개발을 한 후 서버에 올려 톰캣을 실행하다 보면 위와 같은 에러를 볼수 있다. PermGen space 는 Class, Method 등이 저장되는 영역으..
aljjabaegi.tistory.com
epthffh.tistory.com/entry/JVM-%EB%A9%94%EB%AA%A8%EB%A6%AC-%EA%B4%80%EB%A0%A8-%EC%84%A4%EC%A0%95
JVM 메모리 관련 설정
Out Of Memory 오류로 추정했을시에 발생 시점 참고:http://www.nextree.co.kr/p3878/ 개발이 완료되어 사용자 테스트 혹은 인수인계 단계에 많이 발생 (부하를 주는 작업 때문?) Exception in thread “main”: j..
epthffh.tistory.com
[Tomcat] catalina.sh 와 setenv.sh
스프링으로 외부 속성파일의 값을 @value 어노테이션으로 스프링 빈에 주입할 수 있다. 그런데 아무리 뒤져봐도 프로퍼티 파일에 관련된 내용이 없어 도대체 이 값이 어디서 가져오는 건지 찾아
wiper2019.tistory.com
dec9th.github.io/2018-02-05-tomcat8-set-heap
Set heap size in tomcat8 · dec9th
Written by santa on February 05, 2018 Set heap size in tomcat8 Tested all on tomcat8 Overview tomcat7까지는 catalina.sh 에서 처리가 가능하였으나 OPT 설정이 많아 지면서 setenv.sh에서 사용하는게 오히려 서비스 간 간결함
dec9th.github.io
java - Tomcat 7: 초기 힙 크기를 설정하는 방법을 제대로? - Answer-ID
태그 java, linux, tomcat7, heap-memory. I was trying to 초기 힙 크기의 조정하십시오 tomcat 7 (CentOS java - 버전: 다음 줄을 추가하여 인스턴스입니다 1.6.0_25-b06) catalina.sh: Tomcat 실패하고 로깅합니다 카타리나
answer-id.com
[톰캣] setenv.sh 활용하기
톰캣 운영시, JVM 옵션과 같은 추가 설정을 좀 더 깔끔하게 관리할 수 있는 방법에 대해 정리한다. 문제점 - 대부분의 시스템들은 JVM 관련 옵션을 catalina.sh 파일을 수정하여 사용함. - 이렇게 ca
pshcode.tistory.com
dec9th.github.io/2018-02-05-tomcat8-set-heap
Set heap size in tomcat8 · dec9th
Written by santa on February 05, 2018 Set heap size in tomcat8 Tested all on tomcat8 Overview tomcat7까지는 catalina.sh 에서 처리가 가능하였으나 OPT 설정이 많아 지면서 setenv.sh에서 사용하는게 오히려 서비스 간 간결함
dec9th.github.io
[톰캣] Tomcat 서버 로그(log)파일인 catalina.out을 날짜별로 생성되도록 수정하기
지금 하고 있는 프로젝트의 WAS가 원래는 웹스피어였는데 무슨 영업적인 문제인지 경제성 때문인지는 모르겠지만 급하게 Tomcat으로 변경되었습니다. 서버담당자가 따로 없어서 제가 톰캣을 설치
zzznara2.tistory.com
gangnam-americano.tistory.com/42
[WAS] Tomcat 로그 설정(무분별하게 커지는 catalina.out 용량 설정하기)
[WAS] Tomcat 로그 설정(무분별하게 커지는 catalina.out 용량 설정하기) Apache Tomcat을 사용하다보면 catalina.out이라는 tomcat로그가 쌓인다. 이 로그파일을 관리하지 않는다면 catalina.out은 삭제되지 않..
gangnam-americano.tistory.com
Tomcat의 catalina.out 로그 날짜별 생성하기
Tomcat의 로그파일중 catalina.out은 하나의 파일에 계속 로그가 누적됨으로 파일의 크기가 무지막지하게 커지는 현상을 볼수있다. 차후 파일의 크기가 일정크기를 벗어났을때 에러도 발생하기때문
savour.tistory.com
[Tomcat] catalina.out 날짜별 분리
얼마전 톰캣 설치 후 이것저것 일하다가..로그를 확인 할 일이 있어 보는데..catalina.out의 용량이 너무 ...
blog.naver.com
아파치, 톰캣 날짜별 로그파일 생성
아파치 날짜별 로그 1. vi /etc/httpd/conf/httpd-vhosts.conf 2. CustomLog "|/usr/sbin/rotatelogs /data/logs/httpd/access.log.%Y%m%d 86400" common - /usr/sbin/rotatelogs 경로는 다를수 있음. 3. alias..
developer-ljo.tistory.com
톰캣 날짜별로 로그(catalina.out) 생성
vi /apache-tomcat-7.0.57/bin/catalina.sh 아래 문장 검색하여 주석처리 touch "$CATALINA_OUT" >> "$CATALINA_OUT" 2>&1 "&" 라인 지운 뒤 아래 문장 추가 "2>&1" \| /usr/sbin/rotatelogs "$CATALINA_OUT".%Y-%..
boya.tistory.com
Tomcat 무분별하게 catalina.out 크기 커지는것 막기
Tomcat의 로그를 보다보니 날짜별로 로그 파일을 나누어 쌓고 있음과 동시에 catalina.out이라는 파일에도 중복하여 로그를 쌓는것을 알수 있다. 이 파일은 끝없이 커지는데 관리상 좋지 못한것은 자
enterkey.tistory.com
vulncat.fortify.com/ko/detail?id=desc.dataflow.abap.cross_site_scripting_poor_validation
Software Security | Cross-Site Scripting: Poor Validation
Input validation and representation problems ares caused by metacharacters, alternate encodings and numeric representations. Security problems result from trusting input. The issues include: "Buffer Overflows," "Cross-Site Scripting" attacks, "SQL Injectio
vulncat.fortify.com
www.slideshare.net/TJSeo/ss-64076500
포티파이 안전한 애플리케이션 구축 및 운영방안
HP Fortify Source Code Analayzer CWE 취약점 점검 툴
www.slideshare.net
wiki.wikisecurity.net/guide:java_%EA%B0%9C%EB%B0%9C_%EB%B3%B4%EC%95%88_%EA%B0%80%EC%9D%B4%EB%93%9C
JAVA 보안 개발 가이드 -
JAVA 보안 개발 가이드 1절. 입력 데이터 검증 및 표현 1. 크로스 사이트 스크립트 공격 취약점(XSS) 가. 정의 외부에서 입력되는 검증되지 않은 입력이 동적 웹페이지의 생성에 사용될 경우, 전송된
wiki.wikisecurity.net
www.koreascience.or.kr/article/JAKO201304163995076.pdf
[정보보안] Seven pernicious kingdoms: 소프트웨어 보안 에러의 분류
참고: Seven pernicious kingdoms: a taxonomy of software security errors 참고: CWE VIEW: Seven Pernicious Kingdoms 소스코드 상의 보안 문제를 다룰 때 같은 종류의 문제끼리 범주화 하면 언제 발생할지..
sisiblog.tistory.com
[JAVA] Secure 코딩, 취약점 해결, 보안을 위한 방법 정리
프로젝트를 진행하면 반드시 시큐어코딩을 점검하게 됩니다. 대부분 툴로 돌리기 때문에 오탐도 많이 나오긴 하지만 일단 기본적인 보안 취약점 요소와 해결방안을 간략하게라도 알고 코딩하
junspapa-itdev.tistory.com
blog.naver.com/taeyoun795/220603999059
JAVA 시큐어 코딩 가이드-1
1. JAVA 시큐어코딩가이드(안행부_2012.09) 1.1 제 1절 입력데이터 검증 및 표현 소프트웨어 개발 보안...
blog.naver.com
maven-surefire-plugin 에러
maven-surefire-plugin 에러
githup에 올라온 프로젝트를 다운받아 빌드하려고 하는데, pom.xml 에서 아래와 같은 오류가 없어지지 않는다. "Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from https://re..
gubok.tistory.com
스프링부트 springboot mvn build test error 에러 해결
관련 글의 stackoverflow 링크 https://stackoverflow.com/questions/13170860/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-10test 링크를 타고 들어가면 다양한 답변이 나온다. 그..
fors.tistory.com
스프링 에러) Maven plugin 에러
maven 에러 Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattemp..
jjunii486.tistory.com
maven-surefire-plugin 에러
githup에 올라온 프로젝트를 다운받아 빌드하려고 하는데, pom.xml 에서 아래와 같은 오류가 없어지지 않는다. "Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from https://re..
gubok.tistory.com
www.inflearn.com/questions/17310
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project. - 인프런
질문 - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project. Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project. 라고 에러 떴는데 https:/
www.inflearn.com
[Maven build시 에러 발생]
현재 maven 프로젝트를 작업 중이며, build 작업 시 maven 빌드의 all 옵션을 사용하고 있다. 평소 잘 동작...
blog.naver.com
[JAVA] Secure 코딩, 취약점 해결, 보안을 위한 방법 정리
프로젝트를 진행하면 반드시 시큐어코딩을 점검하게 됩니다. 대부분 툴로 돌리기 때문에 오탐도 많이 나오긴 하지만 일단 기본적인 보안 취약점 요소와 해결방안을 간략하게라도 알고 코딩하
junspapa-itdev.tistory.com
rule.codesafe.co.kr:90/dokuwiki/doku.php?id=codesafe:ko:java:resource_leak
부적절한 자원 해제 - KISA 소프트웨어 개발 보안 가이드
https://www.kisa.or.kr/public/laws/laws3.jsp 기술안내서 가이드 < 관련법령·기술안내서 < 자료실 : 한국인터넷진흥원 기술안내서 가이드 한국인터넷진흥원 기술안내서 가이드 입니다. 게시판 목록 보기
skogkatt.tistory.com
java - 검사 도구가 보안 문제를보고하는 이유는 무엇입니까?
우리 애플리케이션은 HP Fortify를 사용하여 보안 취약점을 검사합니다. 발견 된 한 가지 취약점은 Unreleased Resource : Database 취약점입니다. 는 추상은 솔루션이 제안이로 변환하여 if(conn != null){ try{ c
stackoverrun.com
java - 출시되지 않은 리소스 : 스트림
안녕하세요 freinds 다음 코드에 대한 요새 보고서에 경고가 나타납니다 : catch 블록에서 언급 한 : catch (UnknownHostException e) { //catch exception Vibhas added log.info("UnknownHostException occured"); } catch (IOException .
stackoverrun.com
vulncat.fortify.com/ko/detail?id=desc.controlflow.java.unreleased_resource_sockets
Software Security | Unreleased Resource: Sockets
Poor code quality leads to unpredictable behavior. From a user's perspective that often manifests itself as poor usability. For an attacker it provides an opportunity to stress the system in unexpected ways.
vulncat.fortify.com
chanztudio.tistory.com/33?category=819862
소스코드 진단하기 #1 이클립스
이번 키사 교육에서 시큐어 코딩에 대한 교육이 있었는데 그중 개발자들이 개발을 하더라도 보안에 취약한 코드를 사용할 때 개발 단계에서 테스트를 통해 취약한 코드를 분석하는 법에 대해
chanztudio.tistory.com
chanztudio.tistory.com/39?category=819862
소스코드 진단하기 #2 젠킨스
저번 #1(https://chanztudio.tistory.com/33?category=819862)에서는 이클립스에서 사용할 수 있는 플러그인 스팟버그를 이용하여 시큐어 코딩 여부를 확인했다면 이번엔 젠킨스라는 어플리케이션을 이용하여
chanztudio.tistory.com
chanztudio.tistory.com/41?category=819862
소스코드 진단하기 #3 젠킨스 활용
젠킨스 설치가 너무 길었다보니 2부작으로 드디어 젠킨스 활용편을 적을 수 있게 되었다. 일단 젠킨스 자체는 Web App에서 작동하므로 익스플로러나 크롬과 같은 어플에서 열어둔 포트 9090을 통해
chanztudio.tistory.com
시큐어 코딩 가이드 완벽 숙지
java로 쓰인 시큐어코딩 가이드를 방학 중에 완벽 숙지하는 것이 지난 목표였고, 개학을 맞은 지금, '내 임의대로' ppt로 시큐어코딩 가이드를 모두 정리하였다. 내가 정리한 것을 순서대로 써 보
youjing.tistory.com
[시큐어코딩] 소프트웨어 개발 보안 과정 참고자료
00. 전달교육을 위한 교육용 PPT는 yskim@openeg.co.kr 로 요청 주세요. 0. 안행부 소프트웨어 개발 보안 가이드 1. 안행부 자바 시큐어코딩 가이드 2. 안행부 C 시큐어코딩 가이드 3. 국내 암호이..
openeg.co.kr
JAVA 시큐어 코딩 가이드-1
1. JAVA 시큐어코딩가이드(안행부_2012.09) 1.1 제 1절 입력데이터 검증 및 표현 소프트웨어 개발 보안...
blog.naver.com
[JAVA] Secure 코딩, 취약점 해결, 보안을 위한 방법 정리
프로젝트를 진행하면 반드시 시큐어코딩을 점검하게 됩니다. 대부분 툴로 돌리기 때문에 오탐도 많이 나오긴 하지만 일단 기본적인 보안 취약점 요소와 해결방안을 간략하게라도 알고 코딩하
junspapa-itdev.tistory.com
소프트웨어 개발 보안 – 시큐어 코딩
사이버 공격 기술은 끊임없이 진화하고 있습니다. 해커들은 다양한 소프트웨어와 시스템의 취약점을 찾아내 공격하는데요. 다음 그림은 소프트웨어 취약점을 통해 공격하는 패턴입니다. DB와
blog.lgcns.com
[Windows/윈도우즈] Custom URL Schemes ( Protocol Handler ) 레지스트리 등록 방법
# Active X 대체 기술 HTML5 를 이용한 대체 기술도 있지만 C기반 보안 솔루션의 설치를 지원해아하므로 URL Scheme 기술을 사용 # Custom URL Schemes 대부분의 OS에서 URL Scheme을 직접 등록하고 설정할 수 있.
duzi077.tistory.com
[Custom URI] Custom URI 적용(경고창제어), NSIS Custom URI 적용하기 (Windows & Explorer 예제, C#, NSIS Script)
오늘은 CustomURI 적용방법에 대해 포스팅을 할 까 합니다. http://www.naver.com ftp://10.220.10.123 위와 같이 http, ftp 와 같은 것이 URI Scheme 이다. Custom URI는 저런 http, ftp대신 임의로 내가 만든 UR..
rainflys.tistory.com
커스텀 브라우저 프로토콜로 응용프로그램 실행 - custom url schemes in windows
커스텀 브라우저 프로토콜로 응용프로그램 실행 (Custom Url Schemes in windows) 관련 자료 https://support.shotgunsoftware.com/hc/ko/articles/219031308 커스텀 브라우저 프로토콜을 사용하여 응용프로그..
mvcp.tistory.com
addFlashAttribute 여러번 set 할 경우 모두 null 떨어짐... map 으로 객체 set 하는게 좋을듯...
스프링3(Spring3) - RedirectAttributes를 이용하여 리다이렉트 POST 방식으로 데이터 전송하기
우리는 페이지 구현하면서 종종 redirect를 해줄 경우가 있다. 하지만, 대부분 parameter들을 url뒤에 붙여서 get방식으로 값을 넘겨준다. 이번에 다룰 내용에서는 redirect post를 다룰 예정이다. 바로 Red
roqkffhwk.tistory.com
RedirectAttributes(redirect 객체 전달)
redirect 시 데이타를 전달할 수 있는 방법 - RedirectAttributes 클래스를 사용하여 전달할 수 있다. - RedirectAttributes 클래스는 Spring 3.1 버전에 추가되었다고 한다. - redirect시 RedirectAttributes 클..
web-obj.tistory.com
Spring3 RedirectAttributes 사용한 redirect POST 전송법
이번 내용은 리다이렉트 전송시 parameter를 URL에 붙여서 전송하기 싫어하는 분들을 위한 포스팅입니다. Spring3 에서 제공하는 RedirectAttributes를 사용하면 redirect post 구현이 가능합니다. 하지만 일
hellogk.tistory.com
스프링 addAttribute addFlashAttribute 차이점 (RedirectAttributes rttr) / 리다이렉트
addAttribute와 addFlashAttribute의 차이점 addAttribute는 삭제를 했을 때 url 을 보자. redirect는 list까지다. 근데 page , perPageNum, searchType, keyword 가 뒤에 따라 붙었다. rttr.addAttribute 때문..
bactoria.tistory.com
한국인터넷진흥원(KISA) 기술안내서 가이드 (시큐어 코딩 가이드 etc)
출처: https://iamfreeman.tistory.com/entry/한국인터넷진흥원KISA-기술안내서-가이드 [자유인을 위하여~ *^^*]
한국인터넷진흥원(KISA) 기술안내서 가이드 (시큐어 코딩 가이드 etc)
한국인터넷진흥원(KISA) 기술안내서 가이드 (시큐어 코딩 가이드 etc) 한국인터넷진흥원(KISA)에서 제공하는 기술안내서 가이드 입니다. KISA에서는 많은 기술안내서를 제공하고 있습니다. 그
iamfreeman.tistory.com
커스텀 브라우저 프로토콜로 응용프로그램 실행 - custom url schemes in windows
출처: https://mvcp.tistory.com/entry/커스텀-브라우저-프로토콜로-응용프로그램-실행-custom-url-schemes-in-windows [Pragmatic Programmer]mvcp.tistory.com/entry/%EC%BB%A4%EC%8A%A4%ED%85%80-%EB%B8%8C%EB%9D%BC%EC%9A%B0%EC%A0%80-%ED%94%84%EB%A1%9C%ED%86%A0%EC%BD%9C%EB%A1%9C-%EC%9D%91%EC%9A%A9%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8-%EC%8B%A4%ED%96%89-custom-url-schemes-in-windows
커스텀 브라우저 프로토콜로 응용프로그램 실행 - custom url schemes in windows
커스텀 브라우저 프로토콜로 응용프로그램 실행 (Custom Url Schemes in windows) 관련 자료 https://support.shotgunsoftware.com/hc/ko/articles/219031308 커스텀 브라우저 프로토콜을 사용하여 응용프로그..
mvcp.tistory.com
stackoverflow.com/questions/5702512/weblogic-administration-console-way-too-slow
Weblogic administration console way too slow
I've installed weblogic 10.3.3, configured simple domain with default configuration. And after starting weblogic I cannot use it via admin console because it is starting too slow (~10 mins). It seems
stackoverflow.com
linux.systemv.pe.kr/?s=%EC%9D%B4%EC%8A%88
You searched for 이슈 - Voyager of Linux
12/21/2016 WebLogic 10.3.6 을 설치할때에 관리 서버 1개와 매니지드 서버 1개를 생성하게 됩니다. 그런데, 서버 시작 스크립트에서 난수 관련된 것을 고치지 않으면 시작이 굉장히 오래 걸립니다. 이는
linux.systemv.pe.kr
WebLogic - 웹로직 기동시 비정상적으로 시간이 오래 걸릴 때 확인사항
웹로직 기동시간이 다소 오래걸리는 현상에는 여러가지가 있습니다. 그중에 security 부분에서 기동시간이 ...
blog.naver.com
Linux x86 에서 WLS 10.0 to 10.3 구동이 늦은 현상
특정 사이트에서 Linux 5에 깔끔하게 WLS 를 설치하였다.. 특별한 어려움 없이 설치하였는데 서버가 구동되는데 시간이 약 10분 가까이 소요되었다 -0-; 헐.... 특별한 작업이 없이 늦게 구동이 되길
rajalo.tistory.com
http://pseg.or.kr/pseg/infoinstall/8417
grant all privileges on kotidb.* to koti@'%';
grant all privileges on kotidb.* to 'koti'@'%' identified by '1234' with grant option;
flush privileges;
How to optimize Apache performance on CentOS 7
Posted on December 12, 2017 by VPSCheap Team
Apache is one of the most popular and powerful web servers. And of course, it is open source. It is also known as httpd server. Apache web servers are designed to provide a balance of portability, flexibility, and high performance. Optimizing Apache plays a crucial role in determining the overall performance of the system. Apache is easy to configure and provides simple performance tuning options, which we will discuss in detail today.
PrerequisiteS–
A live CentOS 7 server
Apache web server installed and running
First, let us walk you through the process of installing Apache, incase you haven’t done it already. To install Apache, use the command – sudo yum install httpd as shown below-
installation
The installation will take some time. After the installation, you will be able to see a message on the console as shown below-
installation complete
The main configuration file (httpd.conf) can be seen in location /etc/httpd/conf.
The httpd.conf file contains some default parameters. You can also add your own parameters based on your requirements. Let’s now start with some performance optimizations.
KEEP ALive TIMEOUT-
KeepAliveTimeout is a parameter that defines the number of seconds before closing a connection. This is the maximum seconds Apache will wait for a new request before closing the connection. By default, this parameter is disabled in CentOS 7. However, it is generally good practice to have a KeepAliveTimeout value.
This parameter can be set to a very low value, between 1 and 5. To make this change you can edit the httpd.conf file at location- /etc/httpd/conf
You can add the following line:
KeepAliveTimeout 5
Max Keep-Alive Requests-
MaxKeepAliveRequests is the maximum number of requests which can be served on a TCP connection. This will allow you to limit the number of allowed connections and will help in effective utilization of network bandwidth, without causing traffic congestion. This is a numeric value which when set to 0, will allow unlimited requests.
The recommended value here is 500. To add this parameter you will have to edit the httpd.conf file
You can add the following line-
MaxKeepAliveRequests 500
Keep-Alive-
KeepAlive is a parameter which determines whether more than one request per connection is allowed or not. This helps in ensuring one client does not consume all of the server’s resources. By default, this parameter is disabled in CentOS 7. If you expect Apache to be getting multiple requests from different IPs at once, then this should be turned ON. This can be edited in the httpd.conf file.
In order to turn on this parameter, you can add the following line-
KeepAlive On
Configure Multi-Processing Module-
One of the reasons for slow performance in Apache can be its inability to deal with load. In such cases, a multi-processing module will help.
mpm_prefork_module is part of CentOS 7 and is enabled by default. To confirm this is running, you can use the command- sudo apachectl -t -D DUMP_MODULES |grep mpm
multiprocessing module
If mod_deflate is enabled it will display mpm_prefork_module (shared)
For better performance, you can also use Apache MPM prefork module. This can be set in the httpd.conf file.
You can add the following lines in the file-
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 3000
Once the file is saved, you can restart Apache using command- sudo apachectl restart.
Here is a brief explanation of the mentioned parameters-
StartServers – This sets the number of child server processes created at startup. Initially, this can be kept as a small number and can be gradually increased on a high payload server. This helps in ensuring the right utilization of server resources.
MinSpareServers – This sets the minimum number of idle child server processes and can be tuned for high payload servers.
MaxSpareServers – This sets the maximum number of idle child server processes. In case the number of idle child server processes exceeds this value, then the idle processes are killed.
MaxClients – This is the maximum number of simultaneous requests Apache can handle. Once this limit is reached, the connection will be queued.
MaxRequestsPerChild – This indicates how many requests a child process will handle before terminating. Once this limit has been reached, the child process will die. If this value is set to 0, then the process will never die.
Allow Over ride-
The parameter AllowOverride can be set to ‘All’. However, if this is included within a simple directory tag then it will open an .htaccess file for every directory it visits. So if you have the following configuration-
DocumentRoot /var/www/html/example
AllowOverride All
What will happen is that if you make a request to URL /index.html, then Apache will open an .htaccess file for /, /var/, /var/www/, /var/www/html/, /var/www/html/example
To avoid this waste, you can configure AllowOverride for a specific directory, such as:
DocumentRoot /var/www/html/example
<Directory /var/www/html/example/admin>
AllowOverride All
DNS LOOKUPS
Another factor that can slow Apache down is the time required to perform DNS lookups. Apache records the full hostname of each incoming request in the access.log file. Resolving each of these can be time consuming.
This is configured with the parameter- HostnameLookups in the httpd.conf file. This enables DNS lookups so that hostnames can be logged instead of IP address. In Apache, by default, this parameter is turned off. This property is defined in the httpd.conf file as-
HostnameLookups Off
Once you’re done making all of the above changes, restart Apache using the command- sudo apachectl restart
And that’s it! Your Apache web server should now be way more efficient than it was before.