Statically – part of the binary
Mod.so is required if you want the rest of the modules linked dynamically,
Dso vs Static
Mod.speling in the url simple module that makes you make one typographic submission in the resource you are going, cgi-bin without the - that will be an error mod.spelling will correct.
Mod.alias, gives you ability to alias directory,
Script.alias, like alias with executable power, don’t use it, does not give you the control of flexibility alias does with a directory container,
Talk about basic directive in apache we know, and some modules that supply them,
When you come to a website you are virtually hosting, the main thing that must be set, you have a principal one that you might call default or main,
If you ask for a IP it doesn’t know or a Name VH they don’t know, they have to have a default way for the request, one of the metrics it must be rebout and must be forgiving for arrant behaviour a forgiving behaviour
When it does not know the deafualt behaviour will give to the main server,
WE need to learn the simple procedure this is the default place to go and you come in for a name server, this is the place to go if we are not servicing that IP,
What things need to go into the virtual host container for the main or default server
ServerRoot parent of the apache binary trees,
LockFile /var/log/apache2/accept.lock
IfModule directive all supplied by modules, nested tree of a fork, the later one will hold true, the last declaration has more authority, precedence
Which one has higher precedence, the example is not particularly authoritative but they actually fork the decision tree, not at run time, the service is running, we are either going to go around it or go through it
So binary executable for the binary,
.c static linked component of the kernel,
This says IfModule, if you move the config to a machine and you recompile it wont blow simply trying to start so it will not do these things
This is the global configuration file httpd.conf
Reaps the child processes,
MaxSpare initiates repeaing responses,
MaxClients = Maximum requests
Worker.c
443 ssl’
Directory < “/export/srv/www/vhosts/main/htdocs”>
Main => ALL FQDN
Perl
AllowOverride None
Worker.c
A typical configuration of the process-thread controls in the worker MPM could look as follows:
ServerLimit 16
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
Server limit identifies what will initially launch when the server is started it must be greater or equal MaxClients / ThreadsPerChild
MinSpareThreads and MaxSpareThreads identify the the idle threads in all processes and forks or kills processes to keep this number within the declaration
MaxClients the maximum total number of threads in all processes.
MaxClients / ThreadsPerChild = Max Child Processes
150 / 25 = 6
ThreadLimit must be greater or equal to ThreadsPerChild
While the processes are started as root under Unix intorder to bind processes and threads binding them to port 80 Apache will use less-privileged users.
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon
MaxRequestsPerChild controls how frequently the server recycles processes by killing old ones and launching new ones.
Description:Multi-Processing Module implementing a hybrid multi-threaded multi-process web server
worker.c
it retains much of the stability of a process-based server by keeping multiple processes available, each with many threads.
Or
Prefork.c
It is also the best MPM for isolating each request, so that a problem with a single request will not affect any other.
Directive and Declorations
Declarations = Server Name
Directive = alias this directory their
Directive that configure this to the relation to mother child
\
ONE PARENT
worker.c has a different parent the child process then prefork.c
worker.c uses ThreadsPerChild that controls the number of threads deployed by each child prcess and Max Clients right
while prefork.c uses MinServer and MaxServer that spawns childprocesses that are indepent from the kernel
threads works as a stream as prefork words as a dependent entity
First thing that your going run out of when your worker.c is cpu and prefork.c is memory
Remember to check
http://httpd.apache.org/docs/2.2/mod/prefork.html
http://httpd.apache.org/docs/2.2/mod/worker.html
No comments:
Post a Comment