Differences
This shows you the differences between two versions of the page.
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: | ||
- | * Except leave listening on port 80/tcp | ||
- | * [[linux_wiki: | ||
- | |||
- | ---- | ||
- | |||
- | ====== Create the Bash Script ====== | ||
- | |||
- | Create a basic script | ||
- | <code bash> | ||
- | vim / | ||
- | |||
- | #!/bin/bash | ||
- | echo " | ||
- | echo | ||
- | echo "This is the current time on the system: $(date)" | ||
- | </ | ||
- | |||
- | \\ | ||
- | Make script executable | ||
- | <code bash> | ||
- | chmod +x / | ||
- | </ | ||
- | |||
- | \\ | ||
- | Find SELinux CGI boolean to ensure its on | ||
- | <code bash> | ||
- | getsebool -a | grep httpd_enable_cgi | ||
- | </ | ||
- | |||
- | \\ | ||
- | If OFF, set it to ON | ||
- | <code bash> | ||
- | setsebool -P httpd_enable_cgi 1 | ||
- | </ | ||
- | |||
- | \\ | ||
- | Test CGI deployed script | ||
- | <code bash> | ||
- | elinks http:// | ||
- | </ | ||
- | |||
- | ---- | ||