200 likes | 426 Views
APACHE. 조준희 (Cho, Junhee ) ssaljalu@sparcs.kaist.ac.kr ssaljalu@gmail.com. The Apache Software Foundation. Collaborative Consensus based development process Open and pragmatic software license A desire to create high quality software Lots of software, not only the Apache HTTP Server.
E N D
APACHE 조준희 (Cho, Junhee) ssaljalu@sparcs.kaist.ac.kr ssaljalu@gmail.com
The Apache Software Foundation • Collaborative • Consensus based development process • Open and pragmatic software license • A desire to create high quality software • Lots of software, not only the Apache HTTP Server
The Apache HTTP Server • Secure, Efficient, Extensible • HTTP standards • Most popular web server since 1996 • Robust, Commercial-grade, Featureful • Open-Source, Free!
Multi-Processing Module • Worker MPM하나의 쓰레드가 하나의 요청을 처리적은 메모리 – 많은 트래픽에 적합 • Prefork MPM하나의 프로세스가 하나의 요청을 처리많은 메모리Thread-safe
/etc/apache2/httpd.conf • Apache HTTP Server Version 1에서 설정 파일 • Apache HTTP Server Version 2에서는 설정이 여러 파일에 나뉘어 있고, 이 파일은 사용하지 않고, 호환성만을 위해 남아있다.
/etc/apache2/apache.conf • prefork MPM • StartServers: number of server processes to start • MinSpareServers: minimum number of server processes which are kept spare • MaxSpareServers: maximum number of server processes which are kept spare • MaxClients: maximum number of server processes allowed to start • MaxRequestsPerChild: maximum number of requests a server process serves
/etc/apache2/apache.conf <IfModulempm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule>
/etc/apache2/apache.conf • worker MPM • StartServers: initial number of server processes to start • MaxClients: maximum number of simultaneous client connections • MinSpareThreads: minimum number of worker threads which are kept spare • MaxSpareThreads: maximum number of worker threads which are kept spare • ThreadsPerChild: constant number of worker threads in each server process • MaxRequestsPerChild: maximum number of requests a server process serves
/etc/apache2/apache.conf <IfModulempm_worker_module> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule>
/etc/apache2/apache.conf • TimeOutThe number of seconds before receives and sends time out • AccessFileNameThe name of the file for additional configuration directives • DefaultTypeThe default MIME type
/etc/apache2/apache.conf • ErrorLogThe default location of the error log file • LogLeveldebug, info, notice, warn, error, crit, alert, emergControl the number of messages logged to the error_log
/etc/apache2/ports.conf NameVirtualHost *:80 Listen 80 <IfModulemod_ssl.c> # SSL name based virtual hosts are not yet supported, therefore no # NameVirtualHost statement here Listen 443 </IfModule>
/etc/apache2/envvars • Default environment variables for apache2ctl • 아파치 계정의 기본 환경 변수
/etc/apache2/conf.d • 여러 설정 파일이 모여있는 디렉토리
Module Configuration Files • /etc/apache2/mods-available사용 가능한 모듈 설정 파일이 모여있는 디렉토리 • /etc/apache2/mods-enable활성화할 모듈의 심볼릭 링크가 모여있는 디렉토리
Site Configuration Files • /etc/apache2/sites-available사용 가능한 사이트 설정 파일이 모여있는 디렉토리 • /etc/apache2/sites-enable활성화할 사이트의 심볼릭 링크가 모여있는 디렉토리
# /etc/init.d/apache2 • start • stop • restart • reload • force-reload • start-htcacheclean • stop-htcacheclean • status
.htaccess • 디렉토리 별로 개별적인 아파치 설정을 할 수 있다. • 이 설정을 가능하면 사용하지 않는 것이 좋다. • 성능 문제 • 보안 문제
Reference • The Apache Software Foundationhttp://www.apache.org • The Apache HTTP Server Projecthttp://httpd.apache.org • Documentationhttp://httpd.apache.org/docs/trunk/en/
Thanks. Q&A