Free and Opensource software review, Operating system review, Tips and Tricks, System tweaks, troubleshooting, Tools and Techniques, Hacks

How to Install and Run Apache web server in Linux.

apache iconApache is one of the most popular, free and opensource web server. It has many advanced features and it supports several GUI which makes it the best among others. Apache has configurable error messages, DBMS-based authentication databases, and content negotiation which enables it to be used for small individual websites to Enterprise level websites.

Installing Apache into local computer is very helpful if you are a web developer since it helps you to test your website and its functionality in your computer (in a more controlled and configurable environment) before publishing it to the web. Here are some of the many ways by which you can Install Apache on your Linux system and run a local web server to test you custom web applications.

INSTALLING APACHE IN LINUX

To install Apache in Fedora or Centos or any other rpm based operating system run the following command.

sudo yum install httpd

To install Apache web server in Ubuntu, Linux Mint or any other debian based systems, the following command can be used.

sudo apt-get install apache2

You can also follow the hardest way of installing if both the above steps failed, i.e. installing the server after downloading the latest stable release from the Apache download server.

First extract the downloaded tar file.

tar xvf httpd-2_xx_xx.tar

Once extracted navigate to the extracted directory and configure your server for Apache.

./configure

Now you can build your packages.

make

make install

CONFIGURING APACHE

Now to configure Apache for your requirements, you will have to edit the Apache configuration file.

/etc/httpd/conf/httpd.conf

You can edit the above file in text editor.

The detailed instructions on the parameters and its values specified in this file are mentioned in the httpd.conf file.

STARTING THE APACHE SERVER

Once the Apache is successfully installed, it will be up and running automatically, but if it doesn’t start automatically, then it can be started by typing

apachectl start

in the terminal.

Once the server is successfully started, then you can see the Apache default page by typing

localhost

into the address bar of your web browser.

UPLOADING FILES TO WEBSITE

Once the server is up and running, you can successfully host the pages of your website to be tested and verify your designs. The should be hosted in the following directory.

/var/www/html

You will require root privileges to edit or modify any contents in this directory.  Now you can change the default page present in this directory and replace it with your content.

This pages in this server can be vewed from any computer in the network. To view the pages in your local server, type in you local LAN ip address into the browser.

, , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>