From the course: Red Hat Enterprise Linux 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Deploy a basic CGI application

Deploy a basic CGI application

From the course: Red Hat Enterprise Linux 8 Essential Training

Start my 1-month free trial

Deploy a basic CGI application

- [Instructor] For this exercise, you want to be logged into rhhost1 with the terminal open. We will run a script under CGI that displays some information about the web server. I've created a CGI script for you and included it in the exercise files. You will want to copy the loggedin.sh file to your web server CGI bin directory by going through this chapter's exercise files directory and typing sudo cp loggedin.sh /var/www/cgi-bin and then hit enter. Once you've done that, let's take a look at it. Type in less /var/www/cgi-bin/loggedin.sh and hit enter. This script presents some HTML on the screen and then runs the date command. It also runs the who command. Let's see it work. Press Q to quit. First, let's make it executable. Type in sudo chmod +x /var/www/cgi-bin/loggedin.sh and hit enter. Now we need to turn on an SELinux boolean to allow CGI scripts. Type in clear, then type in sudo setsebool /P…

Contents