🌐How to Install Apache2 Web Server on Linux Server

Good to know : What is apache2 and its uses

Apache is free and open source web server software that allows users to upload websites on the internet. This server has become the platform for 33% of websites worldwide, with the official name Apache HTTP Server. Apache is one of the oldest and best web servers, released for the first time in 1995, and is managed and developed by the Apache Software Foundation.

Apache HTTP Server or Apache Web/WWW Server is a web server that can run on many operating systems which is useful for serving and functioning websites. The protocol used to serve this web/www facility uses HTTP.


Configuration

Install Package

apt install apache2

Change the Default Appearance of Apache2

Remove File default html

rm /var/www/html/index.html

Create a New File html

touch /var/www/html/index.html

Edit File html

nano /var/www/html/index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Web Server Success</title>
  </head>
  <body>
    <h1 align="center">Selamat Datang di Website <span style="color: #378ce7">rizwanpemula.com</span></h1>
    <center>
      <table border="1" cellpadding="10">
        <tr>
          <td>Nama</td>
          <td>Rizwan Fairuz Mamduh</td>
        </tr>
        <tr>
          <td>NIS</td>
          <td>12108740</td>
        </tr>
        <tr>
          <td>Rombel</td>
          <td>TJKT XII-I</td>
        </tr>
        <tr>
          <td>Rayon</td>
          <td>Cicurug 4</td>
        </tr>
      </table>
    </center>
    <marquee direction="right">Konfigurasi Berhasil !!!</marquee>
  </body>
</html>

Restart Service

/etc/init.d/apache2 restart

Last updated