Basic Apache Configuration

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/basic-apache-configuration/
PINTEREST
PINTEREST
INSTAGRAM

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 ismailbaydan.com. to get client use url ismailbaydan.com/photo1.jpg 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 www.ismailbaydan.com  is the hostname of this sites web server. Here ismailbaydan.com is the domain name and www is the hostname. But ismailbaydan.com 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

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 10.1.2.3 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.

 

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/basic-apache-configuration/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  Logrotate Command Tutorial With Examples For Linux

Leave a Reply

Your email address will not be published.