Everything About LAMP [Apache and MySQL]


As we discussed in previous article , Apache is the core part of client server tecnlogies , all request and response are handled by apache in the form of HTML tags . Apache server was written in C language and its all functioning based on one configuration file [httpd.conf or apache2.conf ] which is located in apache root directory . 
We can do some changes in this file like changing server and port name , virtual hosts etc .. Here the sample httpd.conf file

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
 
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule authn_file_module modules/mod_authn_file.so
The following sub sections contain a list of short descriptions for many of the directives included in
httpd.conf:
1. ServerRoot: – It specifies the top level directory containing website contents. By default, Server Root is set to “/etc/httpd” for both secure and non-secure servers. Example: ServerRoot “/etc/httpd”
2. Timeout: – Defines in seconds the amount of time the server waits for receipts and transmissions during communications. (Default value is 300 seconds) Example: TimeOut 300
3.KeepAlive :- It sets whether the server allows more than one request per connection and can be used to prevent any one client from consuming too much of server’s resources.(Default is off) Example: KeepAlive false
4.MaxKeepAliveRequests: – Sets the maximum number of requests allowed per persistent connection. (Default is 100) Example: MaxKeepAliveRequests 100
5. KeepAliveTimeout: – Sets the nuimber of seconds the server waits after a request has been served before it closes the connections. (Default is 15 seconds) Example: KeepAliveTimeout 15
6. DocumentRoot: – Directory which contains most of the HTML files which are served in response to requests. (Default is “/var/www/html” directory) Example: DocumentRoot “/var/www/html”
You can get more information about Apache fromhttp://www.openpeta.com/index.php/apache-http-server/
and Wikipedia Page
 MySQL is the popular open source database which would be in back end of LAMP technology . If you want to store huge information then you can move for this database otherwise you can use file for storing values. You can use command mode or phpmyadmin for creating database in MySQL. For command mode please refer this link http://www.openpeta.com/index.php/mysql-queries-explained/ or watch the following video for understanding phpmyadmin (Its a very good graphical interface for mysql to manipulate database)


No comments:

Post a Comment