Wednesday, 31 October 2012

Apache Server

Apache Server

Apache server or http server or webserver all are the same things. Apache server plays a key role in the initial development of the world wide web. The name of apache was chosen out of respect to the Native American Tribe Apache and its superior skills in warfare strategy. Apache is developed and maintained by an open community of developers under apache software foundation.

The meaning from web server is that, we are not going to create a website, however we are going to create a platform that will run a website. Today mostly apache servers are running on the cloud machines.

Web server in case of redhat is HTTP and in case of Ubuntu it is apache. When we install HTTP on our machine, and restart the service, 8 threads of the apache will run concurrently. Threads mean child processes. When someone makes a hit on the web server, a new process thread will be created. More will be the traffic on your server, more will be the threads and more will be the resources utilized.

One of the major problem, that may exists in troubleshooting the apache is SElinux. If the tags are not defined carefully then your apache server may refuse to work.

Following is the simple guide to run your test site on redhat:

Install the package for apache as

# yum install httpd* -y

When done, create a test file in following location and add any test contents:

# vim /var/www/html/index.html

add the content:

This is a test site.

save the file and exit. 

Restart the service of apache to run the changes.

# /etc/init.d/httpd restart 

Now open the local browser and open with the name of localhost.

Enter the url: http://localhost

The webpage will open and display the above contents.

Also you can open the website with another name suppose your machine's ip is

open the file and add:

# vim /etc/hosts   

save and quit.

Now open the website with url

This is open the website you have created.

No comments:

Post a Comment