Setting Up Apache Web Server Ubuntu

Apache is a free and open-source cross-platform web server for Linux/UNIX-like systems, Microsoft Windows, and OS X. It is the most popular webserver on the Internet and is used by a large number of websites. The server supports HTTP/1.1 and HTTP/2, as well as other protocols such as FTP, FTPS, SCP, SFTP, WebDAV, Amazon S3 file sharing storage, LDAP and more.

In this tutorial we will learn how to install Apache web server on Ubuntu 16.04 LTS Xenial Xerus Linux.

How to install and run Apache web server in Ubuntu Linux - YouTube

Setting Up Apache Web Server Ubuntu

sudo apt install php5-fpm php5-cli php5-common php5-cgi php5-curl openssl libssl-dev mysql-client libmysqlclient18-dev git unzip zip less vim nano wget build-essential software-properties-common python python3 libxml2-utils libxslt1.1 libc6 libc6:i386 libstdc++6 gcc g++ make autoconf automake pkgconfig curl zlib1g zlib1g:i386

Apache is a free, open-source web server that supports HTTP and HTTPS as well as other internet protocols. It’s the most widely used web server on the Internet.

In this tutorial, we will show you how to install Apache web server on Ubuntu 18.04 LTS (Bionic Beaver).

First, let’s update the package index:

sudo apt update -y

Next, install some additional packages needed by Apache to run:

sudo apt install libapache2-mod-php7.2 php7.2 php7.2-mysql php7.2-common php7.2-cli php7.2-curl php7.2-gd php7.2-mbstring php7.2-xmlrpc php7.2-zip php7.2-opcache wget curl git -y

Apache is a free and open-source web server. It is the most popular web server in use, powering over 60% of all websites.

Here, we will learn how to install Apache web server on Ubuntu 18.04 LTS system. There are two ways to install Apache web server:

Using apt package manager

Using apt install command

Please note that if you are using Ubuntu 18.04 LTS server edition then you can only use apt package manager for installation purpose.

The Apache HTTP Server Project is an initiative to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

The Apache web server is the most widely used web server on the Internet. It runs more than half of all websites on the Internet. The Apache HTTP Server Project has been around since 1995, which makes it one of the oldest open source projects in the world.

Install and Configure Apache Web Server on Ubuntu 22.04

This command will install Apache on your Ubuntu machine.

apache2 ubuntu default page

This is the default page of Apache web server running on port 80. This command will show you the default page of your web server. If you want to see the default page of your web server, then use this command in your terminal and hit enter key.

install php ubuntu

PHP (Hypertext Preprocessor) is a scripting language used by many websites to generate dynamic content like forms and reports. In this example we will install PHP 5 on Ubuntu 16.04 LTS Xenial Xerus Linux operating system using APT package manager from terminal window or shell prompt.

sudo apt install apache2

Apache2 is the most popular web server on the internet. It’s a stable and secure server that can handle millions of visitors at once. The default Apache configuration uses port 80 for HTTP traffic and port 443 for HTTPS traffic.

sudo apt install php5-fpm

PHP is a scripting language that’s used to create dynamic web pages. PHP code is embedded in HTML files and executed by the server when they’re viewed in a browser.

sudo apt install mysql-server

MySQL is a database management system that runs on top of Linux servers. You can use it to store information about your website’s content, users, or anything else you need to keep track of.

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

The Apache HTTP Server (“httpd”) is the world’s most popular Web server software. It currently runs on more than 80 percent of all active Web servers.

Apache is a very flexible server, as it can be configured with many different options. It also has many modules (add-ons) available to extend its functionality.

The following commands are used to install Apache 2 on Ubuntu:

sudo apt install apache2

Install Apache, MySQL and PHP on Ubuntu 18.04

sudo apt install apache2 php7.1 mysql-server libapache2-mod-php7.1

Install the latest version of PHP using the PPA:

sudo add-apt-repository ppa:ondrej/php

sudo apt update && sudo apt install php7.2

Start Apache:

sudo systemctl start apache2

Check if the installation worked by browsing to http://localhost/info.php in your browser.

sudo apt install apache2

sudo apt install php7.2

sudo apt install mysql-server

sudo mysql_install_db –user=mysql –basedir=/usr/lib/x86_64-linux-gnu

sudo mysql_secure_installation

sudo apt update && sudo apt upgrade php7.2-common && sudo apt upgrade php7.2-cli && sudo apt upgrade php7.2-curl && sudo apt upgrade php7.2-gd && sudo apt upgrade php7.2-json && sudo apt upgrade php7.2-mbstring && sudo apt upgrade php7.2-mysql && sudo apt upgrade php7.2-opcache && sudo apt upgrade php7.2-readline&&sudoapt upgrade apache2&&sudoapt update && sudoapt install wget -y&&wget http://apachefriends.org/download/mod_md5/./mod_md5-(version).tar.gz&&tar xvfz mod_md5-(version).tar.gz&&cd mod_md5-(version)&&./configure&&make&&make install.

Leave a Comment