Open main menu

CDOT Wiki β

Changes

OPS235 Assignment 2 OLD

6 bytes added, 11:37, 21 March 2012
no edit summary
==== Serving Personal Web Pages ====
:# Configure httpd to serve the <code>~/public_html</code> directories of your users. This will require changes to <code>/etc/httpd/conf/httpd.conf</code> as well as the SELinux configuration. See the man page for <code>httpd_selinux</code> and the Apache [http://httpd.apache.org/docs/2.2/ httpd documentation] for details.:# Prove that this works by creating a page in your <code>~/public_html</code> directory. The URL will be <code>http://''hostname''/~''your-user-id''/</code>:# Create a short web script which displays the available disk space on the computer. At its most basic level, a web script is the same as a regular script, with this additional requirement::#* It must output the line "Content-type: text/plain" or "Content-type: text/html" (depending on whether the script output is plain text or HTML), followed by a blank line.:# Name the script <code>~/public_html/diskfree.cgi</code> - The URL will be <code>http://''hostname''/~''your-user-id''/diskfree.cgi</code>:# Configure httpd and SELinux to allow your script to be run from the web. This will require changes to <code>/etc/httpd/conf/httpd.conf</code> as well as the SELinux configuration (possibly including both booleans and SELinux context). As with step 1, see the man page for <code>httpd_selinux</code> and the Apache [http://httpd.apache.org/docs/2.2/ httpd documentation] for details.
{{Admon/tip|Hint|Look for an "add-handler" line in your httpd.conf file.}}
13,420
edits