• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Urban Penguin

The Urban Penguin - Linux Training

  • Home
  • About
  • Live Online Courses
  • Shop
  • Programming
    • Master Editing Text Files Using VIM
    • Learn Shell Scripting with BASH
    • PERL Scripting in Linux
    • Ruby Scripting in Linux
    • Scripting with PowerShell
    • Learn C Programming using Linux and the Raspberry Pi
    • General Java Tutorials
    • Java 7 OCA Exam 1ZO-803
  • OS Tutorials
    • Red Hat and CentOS Training
      • Red Hat Enterprise Linux System Administration 1 – RH124
      • RHCSA – System Admin 2 – RH134
      • RHCE – EX294 – Automation With Ansible
    • Learning Ubuntu
    • LPI Training
      • LPI Linux Essentials
      • LPIC-1 Linux Administrator
      • LPIC-2 Certified Linux Engineer
      • LPIC-3 Senior Level Certification
        • LPIC-3 Exam 300 : Mixed Environments
        • LPIC-3 Exam 303 : Security
        • LPIC-3 Exam 304 : Virtualization and High Availability
    • Linux Technologies
      • Apache HTTPD Server
      • Learning PHP
      • Learning PUPPET
      • Learning SAMBA
      • Linux File-Systems
      • Monitoring with Nagios Core
      • MYSQL
      • openLDAP Directories on Linux
You are here: Home / Linux / LPI Linux Essentials / Installing an Apache Web Server on the Raspberry Pi

Installing an Apache Web Server on the Raspberry Pi

May 7, 2014 by The Urban Penguin

Of course we have server applications as well as those for the desktop. The Linux Professional Institute understand that the Apache Web Server, their HTTPD product, is the most common web server you will find. We, of course, include this simple tutorial there for you to learn and enjoy.

The Importance of Omnipotence

Adding the Apache HTTP server to the Raspberry Pi will enable the tiny device to serve web content to local or internet users. You can imagine using the Raspberry Pi with online documentation that you make available though the web server. Even if this just to you and your office or home. The web server may also reach out to run other scripts and the web server may be the front-end graphical interface that you supply to control your pet robot or home heating. A web server is omnipotent.

Installing the Apache Web Server

To install the web server on the Pi:

sudo apt-get update
sudo apt-get install apache2

Once installed the packaging script will configure apache for autostart and start the service. Autostart just means that the server will start when the Raspberry Pi boots up. With the web server installed and running we should be able to browse to your site from the desktop of the Pi using the name localhost. Starting your Web browser, midori or another browser of you choice like Iceweasel we can enter the URL:

http://localhost

This should work or we can use the 127 IP address of the local system:

http://127.0.0.1

If you want to connect from another system on your network you will need to know the real IP Address the system has set. To discover this you can run the command as shown:

ip address show

On my system my address is 192.168.0.5. Look for the address assigned to the wired card eth0 or the wireless network card if connected.

http://192.168.0.5

The standard Apache welcome page will display display “It Works”. If we want we can then replace this page with one of our own making. The page is located on the Pi as /var/www/index.html. This is a text file and can be edited from the command line with nano or in the GUI using the Leaf editor,





Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to print (Opens in new window)

Filed Under: Apache, LPI Linux Essentials, Raspberry Pi

Primary Sidebar

Newest Video

The Urban Penguin On Youtube

Categories

Pages

  • About The Urban Penguin
  • Contact Us
  • Shop
    • Basket
    • Checkout
    • My Account
  • LPI Training from The Urban Penguin
    • Live and Pluralsight hosted courses
    • Complete Linux Essentials
    • LPIC-3 Senior Level Certification
      • LPIC-3 Exam 300 : Mixed Environments
      • LPIC-3 Exam 303 : Security
      • LPIC-3 Exam 304 : Virtualization and High Availability
    • LPIC-2 Certified Linux Engineer
    • LPIC-1 Linux Administrator
    • LPI Linux Essentials for Raspberry Pi
    • LPI Linux Essentials
  • Operating System Tutorials
    • Linux Foundation Training
    • Solaris 11 OCA 1ZO-821
    • Learning Ubuntu
    • Learning SUSE
    • Red Hat and CentOS Training
      • RHCE – EX294 – Automation With Ansible
      • RHCSA – System Admin 1 – RH124
      • RHCSA – System Admin 2 – RH134
  • Scripting – the power of repetition!
    • Java 7 OCA Exam 1ZO-803
    • General Java Tutorials
    • Learn C Programming using Linux and the Raspberry Pi
    • Ruby Scripting in Linux
    • Scripting with PowerShell
    • PERL Scripting in Linux
    • Learn Shell Scripting with BASH
    • Master Editing Text Files Using VIM
  • Linux Technologies
    • Learning PUPPET
    • openLDAP Directories on Linux
    • Monitoring with Nagios Core
    • Linux File-Systems
    • Learning SAMBA
    • Apache HTTPD Server
    • Learning PHP
    • MYSQL
  • OpenStack
    • Pluralsight
    • Udemy
    • Raspberry Pi Tutorials
    • Citrix Videos
  • Online Instructor-led Courses
    • Red Hat Enterprise Linux System Administration 1 – RH124
    • SELinux Masterclass
    • Bash Scripting Masterclass
    • Nftables Masterclass

© 2021 The Urban Penguin · All Rights Reserved