Introduction
At least until the development of this article, the Apache was the the Web server used more and more in the world, having an area of more than 60%. For being so important, as well, nothing better than to understand a little bit the Apache, to know its history and know how to begin to use it. This is what you will see in the next lines.
The Apache server
When you access any site, there is a server behind that address responsible for providing the pages, and all the other resources that you can access. So, when you send an e-mail through from a form, puts a message in a discussion forum, make a purchase online, etc, a Web server (or a set of servers)is responsible for processing all of this information.
Being more clear, a Web server is a computer that processes requests HTTP (Hyper-Text Transfer Protocol) the protocol the standard of the Web. When you use an Internet browser to access a site, this makes the requests due to the site’s Web server through HTTP and then receive the corresponding content. In the case of Apache, it not only performs the HTTP, other protocols, such as HTTPS (HTTP is combined with the layer of SSL security – Secure Socket Layer), the FTP (File Transfer Protocol), etc.
As the Web server, Apache is the most widely known and used. The reasons include its excellent performance, security, compatibility with various platforms and all of its features.
The Apache server (or Apache Server) has emerged in the National Center of Supercomputing Applications (NCSA) through the work of Rob McCool. At the exit of the NCSA, McCool has stopped working on the software (which at that time was receiving just the name NCSA), and then several people and groups began to adapt the Web server to your needs. However,they were Brian Behlendorf and Cliff Skolnick has the main responsibility for resumption of the project, counting then with the support of Brandon Long and Beth Frank. The latter had the task of continuing with the development from the server, but by the NCSA. It didn’t take long for them to get together to the Apache Group.
The source of the Apache Foundation (Apache Foundation) comes from there: Brian Behlendorf and Cliff Skolnick came to control “patches” (addition of features or fixes) behind a mailing list. This list was formed the group, consisting initially of 8 people. The name of the foundation appears to have been based on this characteristic (using patches), which can be interpreted as a pun with the English expression “patchy”. However, according to the developers of the server, the name is based on an American Indian tribe name Apache.
The Apache server had its first official version (0.6.2) – released in 1995. At the time this article was written, the latest version it was the 2.2.3/2.2.4. From 1995 until today there have been several changes in the project. Perhaps the most important has been the Shambhala, architecture for Apache developed by Robert Thau. The Shambhala pleased him so much at the time (mainly for its better memory management) that ended up being built definitely to the server, taking away from the scene, the existing base up to so. Came the version 0.8.8, which had, in addition to Shambhala,features of version 0.7.x. After a series of improvements, testing and documentation of new (made by David Robinson), Apache 1.0 was released in December 1995.
Characteristics of the Apache server
The Apache Server is a free software, which means that any you can study, or you change your source code, in addition to being able to use it free of charge. It is thanks to this feature that the software it was (and still is) improved over the years. Thanks to the work many times volunteer of several developers, the Apache continues being the Web server most used in the world.
In addition to being available for Linux (and other systems operating based on Unix), Apache also has versions for the Windows, Novell Netware, and for OS/2, which makes it a great option to run on computers that are obsolete (provided that it meets the minimum hardware requirements).
The Apache server is able to run code in PHP, Perl, Shell Script and even ASP and can act as a FTP server, HTTP, etc. Your use the most known is the one that combines Apache with the PHP language and the MySQL database (combination used here in the AbbreviationFinder, for example).
The requirement of hardware of Apache depends on your application, but a PC Pentium with 64 MB of RAM is able to run it safely in a corporate environment small. However, when it is a site on the Internet, it is interesting to have the machinery so powerful as the one that requires the level of access.
Below follows a summary with the main characteristics (extracted the Guide Focuses on Linux):
– It supports cgi scripts, using languages such as Perl, PHP, Shell Script, ASP, etc.;
– Support the authorization of access may be specified restrictions access separately for each address/file/directory accessed on the server;
– Authentication requiring a user name and valid password to access any page/sub-directory/file (supporting cryptography, via the Crypto and MD5);
– Content negotiation, allowing the display of the Web page in the language requested by the Client Browser;
– Support for mime types;
– Customization of logs;
– Error messages;
– Support for virtual hosting (it is possible to serve 2 or more pages with the addresses/ ports different from the same process or use more than one process to control more than one address);
– Support for virtual IP hosting;
– Support name virtual hosting;
– Support Proxy server, ftp and http, with-out access, caching (all flexibly configurable);
– Support for proxy and redirect based on the URLs for the address Internal;
– Support for encryption via SSL,digital Certificates;
– Modules DSO (Dynamic Shared Objects) allow you to add/remove features and resources without the need of recompilation of the program.
Installing Apache on Linux
The installation of Apache server in Linux is easy, mainly for being, in the majority of the time, it tied the room existing in the own distribution of Linux. For example, if you uses an operating system based on Debian (or your own), such as Ubuntu, you can install Apache through the command apt-get:
apt-get install apache
The most recommended is to install the versions of Apache prepared for distribution, since that is most likely the software will be optimized to run on it. If you prefer, you can download packages “generic” on the website of Apache Foundation. This is done, the installation can be performed in the following way:
Assuming you downloaded the package httpd-2.2.2.tar.bz2, type in a terminal:
tar -xjvf httpd-2.2.2.tar.bz2
cd httpd-2.2.2 (assuming this is the folder you created)
The command above unzipped the package and the bottom starts the build process and installation:
./configure –prefix=/etc/httpd (if you prefer, indicate after the equal sign the local installation of Apache)
In fact, the previous command can be incremented with the addition or removal of modules. To do this, after “configure”, tell “–enable-module to add a module or “–disable-module” to do otherwise. For example, if you type:
./configure –enable-ssl –enable-rewrite –prefix=/etc/httpd
It means that you are enabling SSL support and “rewrite” that, basically, allows you to “rewrite” the addresses using expressions regular.
After this process, type: make and then make install to complete the installation.
Running Apache on Linux
After installing Apache, it is time to run it. For this there is more than one way, one of them is the following, which you can type in a terminal:
/etc/httpd/bin/apachectl start
In the above command, change to the corresponding path, if the Apache is installed in a different directory. In some cases, just open the terminal and just type “apachectl start”. This will be enough to start the Apache.
The start parameter can be replaced by others, such as:
restart – to restart the Apache;
stop – to stop the Apache;
status – to show the status of the Apache process.
You probably want Apache to start automatically every time that the operating system is loaded. This can be done in the following way: open the file /etc/rc.d/the rc.local (or equivalent, according to your operating system), and add to it the line:
/etc/httpd/bin/apachectl start
There are several ways to start Apache automatically. Another option, for those who use Fedora Core in Portuguese, for example, is the following (assuming that Apache is properly installed): go the menu (red hat), go to Settings System / Server Settings / Services. In the left menu, enable the option “httpd” and click the Save button.
The next step is to configure the Apache (it is recommended do this with the server stopped). For this reason, you should access the directory conf – in our case, /etc/httpd/conf and open configuration files. In this folder you will find, basically, the files httpd.conf, srm.conf (depending on version) and access.conf (depending on version).
Of the three mentioned, the first is the most important, because it is responsible for the settings used by the Apache daemon, the httpd (the daemon is a kind of program that performs tasks in the second plan). The file srm.conf has the task to indicate the resources that Apache needs, that access.conf contains security policies to control access to files and directories.
For this to be an introductory article, will not be given details about how to configure these files, but the last topic of this page contains great links that tell you how to do this.
TUX
No, this topic does not deal with the friendly penguin the symbol of Linux, but yes the TUX server, a creation of Red Hat that works as if “bound” to the Apache. Your goal is to provide static pages of way more optimized possible.
The Apache Foundation
The Apache Foundation, or “the Apache Foundation”, is responsible for a large amount of open source projects, the main one is, of course, the Web server that bears his name.
Formed by names of weight, such as the chairman Greg Stein, the developers Ken Coar, J. Aaron Farr, Cliff Schmidt, among many others, the Apache Foundation if it shows you as a serious entity, collaborative, maintained primarily for donations and relying on the support of large corporations,as IBM and Sun, both in regard to the development of products, as in the supply of hardware, or even in the financial aspect.