Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Change DocumentRoot of the Apache Web Server

In this hands-on lab, your task is to change the DocumentRoot of the Apache web server. DocumentRoot changes also require other corresponding changes. First, we will create a new directory in a location with the proper permissions. The new directory and any nested directories will require read permissions. We will add the to the Apache configuration file. Next, copy the contents from the current directory to the new directory. SELinux will also need to be configured, so the new DocumentRoot can be accessible and able to serve the website to the client. We will verify the new changes. Lastly, we will restore the previous DocumentRoot along with the previous SELinux configuration to verify if the old DocumentRoot is accessible through the browser.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 45m
Published
Clock icon Oct 18, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Create a New Directory for the DocumentRoot

    Note: You must use a local terminal app program with ssh support for this lab (examples: The mac/linux terminal program, or the new Windows Terminal with WSL2). The Instant Terminal can not be used for this specific lab.

    1. Create a new directory.
    2. Edit the Apache configuration file.
  2. Challenge

    Copy the Files

    1. Copy the files from the old directory to the new directory.
  3. Challenge

    Configure Selinux and Restart Httpd

    1. Edit SELinux to allow the new directory, file and image.
    2. Restart Apache service.
    3. Verify changes by opening a new private/incognito browser using the public IP address of the cloud server.
  4. Challenge

    Restore Original DocumentRoot and Verify Changes

    1. Edit Apache configuration file and revert to the original DocumentRoot.
    2. Verify changes by opening a new private/incognito browser using the public IP address of the cloud server.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans