Basic Apache Configuration


Hi. In my last post I showed you managing apache server with apachectl. But I decide to give some basic fundamentals about web applications.Here we go.

Web applications are served generally through network (internet) from a web server to the client. Web server serves some resources and functions. Say you want to get a news from site. You need browser to make request and show you the respense  appropriately. The browser is named client. Web server is the source where the client request and get response. Request is made to the server to get some resources and then server gives back response. During transmission of the reqests and response the protoocl named http and https is used. Https is the secure version. So client(web browser) and server (apache ) speak http language. The server can reside a lot of sources like news,photos, blog pages, how can we sepatate them each other. All resources reside in web server have a url which is simply path. We call this url on server url-path. Say you want to get photo1.jpg from to get client use url by using http protocol, then server responds with related data. And there are quesry strings added to the urls. Resources divided in to two types. These are static and dynamic. Static resouces stay the same for all requests. Doesn’t change rapidly and they are generally files, photos or html pages. Dynamic content or resouces are generated by a application or cgi. And changes for almost of the requests. For all of these request and responds logs created  and added to the files those described in configuration files.

Hostname and Dns

Web servers generally use hostname to be named. For example  is the hostname of this sites web server. Here is the domain name and www is the hostname. But is generally enough to get web server content. You know end points use ip for communicating. hostname must be converted to ip for network layer communication. But this is not needed for http protocol. local hosts file can be used to name resolution . But this configuration must be done in client side.


Directives are verbs of the apache configuration. To configure a location or directory or anything directives are used.

For example to follow links in a linux system for “/usr/local/httpd/htdocs

Create Virtual Host For Apache2

Some times we need to server more than one web server from one server. To do this all web servers needs to use virtual host directive. Here we create a new web server which serves from and port 80 and then we describe the attributes of the web server. There is a lot of directives related to url, file, directory … DocumentRoot directive is used to set web site root directory.


LEARN MORE  Linux Scheduling Commands With at, atq, atrm and batch Examples

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)