Presentation is loading. Please wait.

Presentation is loading. Please wait.

What all is there Inside the Apache web server. These slides are part of study material of LAMP course. Course conducted by Prof Rocky Jagtiani – Technical.

Similar presentations


Presentation on theme: "What all is there Inside the Apache web server. These slides are part of study material of LAMP course. Course conducted by Prof Rocky Jagtiani – Technical."— Presentation transcript:

1 What all is there Inside the Apache web server. These slides are part of study material of LAMP course. Course conducted by Prof Rocky Jagtiani – Technical Head – Suven Consultants For any queries mail to :

2 What all is there Inside the Apache web server There are too many components / modules inside the web server, only 10% is used at any point of time by the web developers. To look into the Apache web server, look into the conf file. $vi /etc/init.d/conf/httpd.conf # for a ordinary user this file is read only. $ su root or simply $ su, again open httpd.conf file. The file has many sections. 2Suven Consultants - Channel Partner - Monster India

3 Brief over view of the important sections of the Apache web server The conf directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, which responds to requests that aren't handled by a virtual host. These directives also provide default values for the settings of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to different IP addresses or hostnames and have them handled by the same Apache server process. 3Suven Consultants - Channel Partner - Monster India

4 Section 1: Global Environment # The directives in this section affect the overall operation of Apache, such as the number of concurrent requests it can handle or where is the location of the configuration files. ServerRoot "/etc/httpd“ Indicates location of the apache server process. PidFile run/httpd.pid PidFile: The file in which the server should record its process identification number when it starts. Timeout 120 Timeout: The number of seconds before receives and sends time out. 4Suven Consultants - Channel Partner - Monster India

5 Server-Pool Size Regulation (MPM specific) 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 # ServerLimit: maximum value for MaxClients for the lifetime of the server # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild Suven Consultants - Channel Partner - Monster India

6 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 StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 Listen attribute : indicates the IP address and the port no. on which the apache web server listens to. Default IP : Port no : 80 Lastly this section indicates all the modules loaded at start up. “ LoadModule” 6Suven Consultants - Channel Partner - Monster India

7 Section 2: 'Main' server configuration The directives in this section set up the values used by the 'main' server, which responds to any requests that aren't handled by a definition. It also defines settings for the containers. 1> DocumentRoot = “ /var/www/html ” indicates the location where we would place the web pages ( php files) 2> UserDir. This directory is the home directory of any individual user. For each /home/ there is a public_html folder at the web server. This folder holds all the web pages to be visible to the entire world. 3> Permissions. Used to give the permission to UserDir. Like AllowAll, Allow, AllowNone. 4> HostnameLookups. This feature is OFF by default. If ON, then for every request a log is created in the table “HostnameLookups” 5> ErrorLog logs/error_log this file logs all the errors. 6> LogLevel indicates the type of the message logged like warn, error, debug, info. 7Suven Consultants - Channel Partner - Monster India

8 Section 3: Settings for virtual hosts, which allow Web requests to be sent to different IP addresses or hostnames and have them handled by the same Apache server process. NameVirtualHost *:80 Indicates the port at which the virtual host would listen. The attribute (in black colour) and the value (in the red colour) ServerAdmin DocumentRoot /var/www/html/labtest 8Suven Consultants - Channel Partner - Monster India

9 DirectoryIndex index.php AuthType Basic AuthName "This is for test" AuthUserFile /usr/httpdpassdir/passwords Require user rocky suven AllowOverride All Order allow,deny Allow from All ServerName suvenconsultants.com ErrorLog logs/labtest-error_log CustomLog logs/testps-access_log combined Suven Consultants - Channel Partner - Monster India9


Download ppt "What all is there Inside the Apache web server. These slides are part of study material of LAMP course. Course conducted by Prof Rocky Jagtiani – Technical."

Similar presentations


Ads by Google