Blob Blame History Raw
# 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$
# ------------------------------------------------------------------

# ------------------------------------------------------------------
# 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/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.

ScriptAliasMatch ^/webenv/(.*)$ "/home/centos/public_html/Webenv/webenv.cgi"
AliasMatch ^/public/(.*)$ "/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
#
#<VirtualHost *:80>
#    ServerName  projects.centos.org
#    DocumentRoot /var/www/html
#</VirtualHost>
#
#<VirtualHost *:80>
#    ServerName  www.centos.org
#    ScriptAliasMatch ^/[^public](.*)$ "/var/www/cgi-bin/webenv.cgi"
#    Alias /public "/var/www/html"
#</VirtualHost>