Apache Software Foundation(ASF)
The ASF is a non-profit corporation having decentralized opensource community of developers. Their purpose is supporting Apache software projects under Apache license.
Apache HTTP Server
The Apache HTTP Server, commonly known as Apache, is a free and open-source cross-platform web server. It is released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation.
Apache runs on 67% of all web servers in the world. It is fast, reliable, and secure. It can be highly customized to meet the needs of many different environments by using extensions and modules.
On Debian, Ubuntu, Raspbian, and LinuxMint
sudo aptitude install apache2
sudo dnf install httpd
On CentOS and Red Hat Enterprise Linux (RHEL)
sudo yum install httpd
pacman -S apache
On macOS (Using Homebrew)
brew install httpd
Popular options for deploying Apache httpd and optionally, PHP + MySQL or PHP + MariaDB on Microsoft Windows, include;
Once you have Apache installed you need to know where to put your HTML documents. This location is generally referred to as the
DocumentRoot. This location is usually
/var/www/html on most Linux systems. Follow the instructions below to find the configuration file for Apache and the
~$ sudo grep "DocumentRoot" -R /etc/
-R flag will cause grep to search recursively through the
/etc directory and print out the full path of the file that it finds the
DocumentRoot keyword in.
/etc/apache2/sites-available/000-default.conf: DocumentRoot /var/www/html /etc/apache2/sites-available/default-ssl.conf: DocumentRoot /var/www/html /etc/apache2/sites-enabled/000-default.conf: DocumentRoot /var/www/html
/etc/httpd/conf/httpd.conf DocumentRoot /var/www/html
sudo systemctl start httpd
Run Apache on Startup
sudo systemctl enable httpd
Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from authentication schemes to supporting server-side programming languages such as Perl, Python, Tcl and PHP. Popular authentication modules include modaccess, modauth, moddigest, and modauthdigest, the successor to moddigest. A sample of other features include Secure Sockets Layer and Transport Layer Security support (modssl), a proxy module (modproxy), a URL rewriting module (modrewrite), custom log files (modlogconfig), and filtering support (modinclude and modextfilter).
Popular compression methods on Apache include the external extension module, mod_gzip, implemented to help with reduction of the size (weight) of Web pages served over HTTP. ModSecurity is an open source intrusion detection and prevention engine for Web applications. Apache logs can be analyzed through a Web browser using free scripts, such as AWStats/W3Perl or Visitors.
Virtual hosting allows one Apache installation to serve many different Web sites. For example, one computer with one Apache installation could simultaneously serve www.example.com, www.example.org, test47.test-server.example.edu, etc.
Apache features configurable error messages, DBMS-based authentication databases, content negotiation and supports several graphical user interfaces (GUIs).
It supports password authentication and digital certificate authentication. Because the source code is freely available, anyone can adapt the server for specific needs, and there is a large public library of Apache add-ons.
If you want to host multiple domains on a single server, you can configure Virtual Hosts in Apache.
You can copy the
default.conf and modify accordingly in the following directory: