diff --git a/Scripts/Python/Webenv/webenv.conf b/Scripts/Python/Webenv/webenv.conf index 83b4ce8..d40a5a3 100644 --- a/Scripts/Python/Webenv/webenv.conf +++ b/Scripts/Python/Webenv/webenv.conf @@ -1,33 +1,83 @@ -# webenv.conf -- 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 by this file assumes that you've -# installed the Apache HTTP server in your workstation and have also -# configured it to public content inside the `public_html' directory -# inside the user's home directory. This configuration is mainly for -# developers whom have downloaded a working copy of `webenv.cgi' tree -# into their worstation in order to on it in a way that it be possible -# to test changes before commit them up to the central repository. -# -# To install this configuration, copy this file to -# `/etc/httpd/conf.d/' and, after that, reload the httpd server deamon -# (e.g., /sbin/service httpd reload). -# -# To test the changes you've made in your working copy directory, -# related to `webenv.cgi' tree, open the address -# `http://localhost/webenv/' in your web browser and explore the -# application looking for them. -# +# 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. # ------------------------------------------------------------------ # $Id$ # ------------------------------------------------------------------ -# Define the CGI script location. Be sure to use the script file, not -# the directory where the script file is stored in. This way, the -# security issues are reduced to that CGI script you refered to. -ScriptAliasMatch ^/webenv/(.*)$ "/home/centos/public_html/Webenv/webenv.cgi" +# ------------------------------------------------------------------ +# The `Aliases' Configuration: +# +# 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. +# +# A possible solution would be to download the `webenv.cgi' tree from +# the central repository into your home directory using the following +# directory structure: +# +# ~/user +# `-- public_html +# |-- cgi-bin +# | |-- Apps +# | `-- webenv.cgi +# |-- Images +# |-- Stylesheets +# `-- stylesheets.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. +# +# 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/~user/webenv/', where `user' is your +# user name. + +ScriptAliasMatch ^/~centos/webenv/(.*)$ "/home/centos/public_html/cgi-bin/webenv.cgi" +Alias /public "/home/centos/public_html" -# Define the CGI public location. This is the location where public -# files (e.g., images and css files) are stored in. -Alias /webenv-pub/ "/home/centos/public_html/Webenv/Public/" +# ------------------------------------------------------------------ +# The `Virtual Domain' Configuration +# +# This configuration assumes you are a system administrator whom needs +# to put the `webenv.cgi' script in production. For example, if you +# administer the `centos.org' domain, this configuration would let you +# to run the `webenv.cgi' script with an URL like +# `http://www.centos.org/'. +# +# This configuration requires that you set up your DNS to point such +# URLs to the same IP address and copy this file (i.e., `webenv.conf') +# into the `/etc/httpd/conf.d/' directory. Once you've done this, +# reload the httpd service (e.g., /sbin/service httpd reload) and use +# the URL you set up to reach the application. +# +# Notice that, in this configuration you don't make changes inside the +# `webenv.cgi' script source code. In this configuration, the +# application's source code would be in a place accesable by apache +# and root users only (e.g., `/var/www/cgi-bin') with the only purpose +# of being productive there. Of course, you as system administrtors +# can update the `webenv.cgi' source code in this location when web +# developers do release new version of it. + +#NameVirtualHost *:80 +# +# +# ServerName projects.centos.org +# DocumentRoot /var/www/html +# +# +# +# ServerName www.centos.org +# ScriptAliasMatch ^/[^public](.*)$ "/var/www/cgi-bin/webenv.cgi" +# Alias /public "/var/www/html" +#