diff --git a/Scripts/Python/centos-web/webenv.conf b/Scripts/Python/centos-web/webenv.conf index 6361087..60efdcb 100644 --- a/Scripts/Python/centos-web/webenv.conf +++ b/Scripts/Python/centos-web/webenv.conf @@ -1,58 +1,57 @@ -# This file provides the configuration required by Apache HTTP server -# in order for `webenv.cgi' script to be able of running through it. -# The configuration provided in this file is splitted in two, one -# through aliases and other through virtual domains (see bellow) you -# need to comment/uncomment in order to get a functional configuration. +# This file provides the apache configuration you need to copy under +# `/etc/httpd/conf.d/' directory, in order to execute the +# `centos-web.cgi' script. The configuration provided in this file is +# described in two sections, one for aliases and other for virtual +# domains. # ------------------------------------------------------------------ # $Id$ # ------------------------------------------------------------------ # ------------------------------------------------------------------ -# The `Aliases' Configuration: +# Configuration Through Aliases: # # This configuration assumes you are a web developer whom needs to -# prepare a workstation for downloading a working copy of `webenv.cgi' -# in order to test the changes you made locally before commit them up -# to the central repository. +# download a working copy of `centos-web' tree into your workstation +# and also be able of testing the changes you made before commit them +# up to central repository. # -# A possible solution would be to download the `webenv.cgi' tree from -# the central repository into your home directory using the following -# directory structure: +# As possible solution, you need to create the following directory +# structure in your home directory: # # ~/user -# `-- public_html -# `-- webenv -# |-- cgi-bin -# | |-- apps -# | `-- webenv.cgi -# `-- public -# |-- images -# |-- stylesheets -# `-- stylesheets.css +# |-- cgi-bin (1) +# | `-- centos-web (2) +# | |-- apps +# | `-- centos-web.cgi +# `-- public_html (3) +# |-- images +# `-- stylesheet.css # -# In this structure, the `cgi-bin' directory must be set with a -# `httpd_sys_script_exec_t' selinux context in order for cgi scripts -# inside to be executed correctly. So, inside `cgi-bin' directory is -# where we put the `webenv.cgi' script and all related `.py' files it -# needs to run. Outside the `cgi-bin' directory, we put all public -# information (e.g., images and css files) and then configure apache -# to work with such structure. +# (1): This directory must be created with a +# `httpd_sys_script_exec_t' selinux context. This directory +# organizes cgi scripts and related executable files. # -# Be sure to enable requests to `/~user/' to serve the user's -# public_html directory inside the `/etc/httpd/conf/httpd.conf' file -# and copy this file (i.e., `webenv.conf') to `/etc/httpd/conf.d/' -# directory in order to make the web application available at the URL: -# `http://projects.centos.org/webenv/'. - -#FIXME: The css file uses absolute urls to call image files and other -# css related files which aren't loaded when the domain is different -# to that one specified inside the css files. +# (2): This directory must be created using subversion's `co' +# command. For example, consider the cgi-bin location where it is +# stored in the central repository and download it here. Notice that +# both central repository and home directory structure used for +# organize cgi script are different and you need to accomodate it in +# your home directory, not in the central repository. +# +# (3): This directory must be created with a `httpd_sys_content_t' +# selinux context. This directory contains all public files cgi +# scripts need (e.g., images and css files). +# +# Finally, be sure to configure Apache HTTP server to serve pages in +# the `public_html' directory stored in your home directory. This is +# done by enabling the UserDir option inside Apache's main +# configuration file (i.e., `/etc/httpd/conf/httpd.conf'). -ScriptAliasMatch ^/centos-web/(.*)$ "/home/centos/public_html/centos-web/cgi-bin/webenv.cgi" -AliasMatch ^/public/(.*)$ "/home/centos/public_html/centos-web/public" +ScriptAliasMatch ^/(.+)/(.*)$ "/home/*/cgi-bin/$1/$1.cgi" +AliasMatch ^/public/(.*)$ "/home/centos/public_html" # ------------------------------------------------------------------ -# The `Virtual Domain' Configuration +# Configuration Through Virtual Domains # # This configuration assumes you are a system administrator whom needs # to put the `webenv.cgi' script in production. For example, if you