How do I install Apache 2 software under Ubuntu Linux?
The web server is responsible for providing access to content via the HTTP protocol. Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Some common language interfaces support Perl, Python, Tcl, and PHP.
Install Apache2
The Apache2 (HTTPD) web server is available in Ubuntu Linux. You can install Apache2 using apt-get command. Open a console (terminal) and type the following command to update existing packages:
sudo apt-get updateNext, type the following command to install Apache2 web server:
sudo apt-get install apache2
Configuration Files
- Default http port - 80
- Default https (SSL) port - 443
- Default configuration directory - /etc/apache2/
- Various configuration file directory - /etc/apache2/conf.d/
- Various configuration files to load modules and configure them directory - /etc/apache2/conf.d/mods-available/ , also /etc/apache2/conf.d/mods-enabled/ is symlinked to this directory.
- Apache virtual hosting configuration directory - /etc/apache2/sites-available/ ,also /etc/apache2/sites-enabled contains symlinks to the /etc/apache2/sites-available directory.
- Default main configuration file - /etc/apache2/apache2.conf
- Default TCP/IP ports configuration file - /etc/apache2/ports.conf
- Default environment configuration file - /etc/apache2/envvars (various Apache2 environment variables are set such as username, PID file etc.)
You can edit all the configuration files using nothing but text editors such as vim.
Confirm Minimal Built-in Modules
Type the following command to display the set of compiled-in modules
$ httpd -l
Sample Outputs:
Compiled in modules: core.c mod_log_config.c mod_logio.c prefork.c http_core.c mod_so.c
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop














{ 1 comment… read it below or add one }
is it better to use the ubuntu installer for apache or to manually download and install apache?