linux_wiki:deploy_a_basic_cgi_application

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux_wiki:deploy_a_basic_cgi_application [2018/04/09 22:54]
billdozor [Lab Setup]
linux_wiki:deploy_a_basic_cgi_application [2019/05/25 23:50]
Line 1: Line 1:
-====== Deploy A Basic CGI Application ====== 
- 
-**General Information** 
- 
-Deploying a basic CGI application via a bash script. 
- 
----- 
- 
-====== Lab Setup ====== 
- 
-The following virtual machines will be used: 
-  * server1.example.com (192.168.1.150) -> Perform all connectivity tests from here 
-  * server2.example.com (192.168.1.151) -> Install Apache Web Server here 
- 
- 
-**Previous Sections Completed** 
-  * [[linux_wiki:network_services_overview_apache_web_server|Install/Configure]] 
-    * Except leave listening on port 80/tcp 
-  * [[linux_wiki:configure_a_virtual_host|Virtual Host Config]] 
- 
----- 
- 
-====== Create the Bash Script ====== 
- 
-Create a basic script 
-<code bash> 
-vim /var/www/cgi-bin/mytime.sh 
- 
-#!/bin/bash 
-echo "Content-type: text" 
-echo 
-echo "This is the current time on the system: $(date)" 
-</code> 
- 
-\\ 
-Make script executable 
-<code bash> 
-chmod +x /var/www/cgi-bin/mytime.sh 
-</code> 
- 
-\\ 
-Find SELinux CGI boolean to ensure its on 
-<code bash> 
-getsebool -a | grep httpd_enable_cgi 
-</code> 
- 
-\\ 
-If OFF, set it to ON 
-<code bash> 
-setsebool -P httpd_enable_cgi 1 
-</code> 
- 
-\\ 
-Test CGI deployed script 
-<code bash> 
-elinks http://bluesite.example.com/cgi-bin/mytime.sh 
-</code> 
- 
----- 
  
  • linux_wiki/deploy_a_basic_cgi_application.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)