Implement an Apache Web Server with Perl CGI

1 hour
  • 8 Learning Objectives

About this Hands-on Lab

In this lab, we will install and configure an Apache server and then configure it for Perl and CGI access.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install the Apache Web Server

Using the appropriate commands, install the Apache web server.

Explore the Default Configuration

Examine the default Apache configuration file.

Start and Test the Service, and Access the Default Site

Ensure the default Apache installation is working.

Install the Appropriate Packages for Enabling Perl on Your Site

Using the appropriate commands, set up and enable Perl. To install mod_perl outside of the Hands-On Lab environment, you may have to
install the epel repo. On a Centos 7 system, this can be done with the following command:

yum -y install epel-release
Enable the Module Configuration

Enable the module configuration on Apache.

Create a CGI Directory for Your Scripts

Create the directory to use with CGI.

Add the CGI Configuration to Apache

Update the Apache configuration for CGI.

Restart the Apache Server and Test the Perl CGI Script

Test that the CGI setup was successful.

Additional Resources

Log in to the server using the credentials provided:

ssh cloud_user@<PUBLIC_IP_ADDRESS>

Note: To install mod_perl outside of the Hands-On Lab environmen,t you may have to install the epel repo.

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?