Apache HTTP Server Tutorial
In this post, we feature a comprehensive Apache HTTP Server Tutorial. The Apache HTTP Server, colloquially called Apache, is the world’s most used web server software. Originally based on the NCSA HTTPd server, development of Apache began in early 1995 after work on the NCSA code stalled. Apache played a key role in the initial growth of the World Wide Web, quickly overtaking NCSA HTTPd as the dominant HTTP server, and has remained most popular since April 1996. In 2009, it became the first web server software to serve more than 100 million websites.
Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. Most commonly used on a Unix-like system (usually Linux), the software is available for a wide variety of operating systems besides Unix, including eComStation, Microsoft Windows, NetWare, OpenVMS, OS/2, and TPF. Released under the Apache License, Apache is free and open-source software.
As of November 2015, Apache was estimated to serve 50% of all active websites and 37% of the top servers across all domains. (Source: Wikipedia)
In this course, we provide a compilation of Apache HTTP Server tutorials that will help you get started with this web server. We cover a wide range of topics, from installing the server and performing a basic configuration, to configuring Virtual Hosts and SSL support. With our straightforward tutorials, you will be able to get your own projects up and running in minimum time.
About the Author
Gabriel’s areas of expertise and interest are Linux system administration, shell scripting, database administration (SQL Server, MySQL, Oracle 11g), object-oriented and procedural programming (Python and PHP), desktop applications (C#, Visual Basic, Excel with VBA) and web development (jQuery, HTML5, CSS3, PHP).
He has also been working as a Level-1 TSR (Technical Support Representative) supporting onsite the startup and ongoing operation of the WMS in a major multinational company, running Red Hat Enterprise Linux and Oracle 11g as RDBMS.
How to install the Apache web server (CentOS / Ubuntu Linux Installation)
In this example we will show how to install the Apache web server in CentOS 7.2 and Ubuntu 14.04.3 using the command line. According to recent reports, Apache continues to keep the lead in the number of websites and Internet-facing machines when compared to other web servers, such as Microsoft’s IIS or Nginx. Such has been the case for a long time, and that is why the skill of knowing how to install, configure, and leverage Apache is on the rise everywhere. In other words, by acquiring Apache skills you will learn how to use the number one server on the Internet.
Apache Configuration Tutorial (CentOS / Ubuntu Linux)
In the first article of this series we introduced you to Apache. If you took the time to read the introduction, you will have noticed that it is the number one server powering websites and Internet-facing computers – and there are plenty of good reasons for that. In this guide we will discuss one of those reasons: its easiness of configuration and seamless integration with server-side scripting languages such as PHP in the context of a standalone web server. In this type of setup, Apache is used to serve a single domain or application, as opposed to running several sites off a single system (also known as virtual hosting, the topic of our next tutorial).
Apache name-based Virtual Host Configuration Example (and setting bandwidth usage limits)
In our previous tutorial we discussed how to configure Apache as a standalone web server (hosting a single site) and how to configure it. In addition, we outlined the most frequent directives and explained the concept of context, which indicates the place where a directive is valid. If you have not read the Apache configuration tutorial yet, you are highly encouraged to do so before proceeding. In this guide we will show you how to use Apache to run multiple sites using a single machine.
Apache mod_rewrite example: Redirecting and rewriting URLs
In a previous article we mentioned that one of Apache’s most distinguishing features is its extensibility via modules, which we defined as “independent, separate pieces of software that provide specific functionality”. Some modules are built-in into Apache as part of the core functionality and are present when the web server is installed as we explained in “How to install the Apache web server”. Others, such as mod_bw (which we covered in “Apache name-based Virtual Host Configuration Example”), can be installed using your distribution’s package management system.
Apache enable SSL / TLS tutorial
In the previous articles of this series, we discussed how to install Apache, configure virtual hosts, rewrite and redirect URLs, and add basic authentication to access resources, among other things. Although all those things are necessary in order to have a functional web server, any serious discussion about Apache must take security into account. In other words, you need to ensure that sensitive and other private data that is sent from a client to your web server is protected along its way.
Apache URL rewrite example: Rewriting and redirecting URLs with mod_rewrite
In Apache mod_rewrite example: Redirecting and rewriting URLs, we introduced you to Perl Compatible Regular Expressions (PCRE) and explained how to integrate them with the mod_rewrite Apache module. These tools allow us to perform URL rewriting and redirecting for a variety of purposes at our convenience. In this tutorial we will build on these concepts and share other examples of URL rewriting you should have handy as a system administrator.
Make sure to retweet this, let your social followers know!
#Apache HTTP Server Tutorial https://t.co/mshDKtmY7h pic.twitter.com/BkWk9zl2D9
— System Code Geeks (@systemcodegeeks) March 21, 2016