From 9a3eda38453820779bf9716614c7019ba7ad35ba Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 09 2011 18:24:31 +0000 Subject: Rename file names from `centos-web' to `webenv' inside `trunk/Scripts/Webenv' directory. --- diff --git a/Scripts/Webenv/centos-web.cgi b/Scripts/Webenv/centos-web.cgi deleted file mode 100755 index d137638..0000000 --- a/Scripts/Webenv/centos-web.cgi +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/python -# -# centos-web.cgi -- This script is an effort to organize The CentOS -# Project information in XHTML format for its publication on the -# Internet. The script is organized in a package named `Apps' which, -# in turn, is subdivided in other packages (e.g., `Home', `Sponsors', -# etc.) to cover each web application the organization demands. -# -# Notice that some of the web applications demanded (e.g., Wiki, -# Lists, Forums, Bugs, etc.) are not included in this script, but -# linked to their own locations. Moreover, in order to provide -# accessability among all different web applications, they need to be -# redesigned to share one unique visual style and one unique top-level -# navigation bar so the current web application can be remarked. -# -# Copyright (C) 2011 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# ------------------------------------------------------------------ -# $Id$ -# ------------------------------------------------------------------ - -import cgi -import cgitb; cgitb.enable() - -def main(): - - qs = cgi.parse() - - if 'app' in qs: - app = qs['app'][0].lower() - else: - app = 'home' - - if app == 'home': - from Apps.Home import page - elif app == 'sponsors': - from Apps.Sponsors import page - else: - from Apps.Unknown import page - - print 'Content-type: text/html' + "\n" - print page.main() - -if __name__ == '__main__': main() diff --git a/Scripts/Webenv/centos-web.conf b/Scripts/Webenv/centos-web.conf deleted file mode 100644 index 83b4ce8..0000000 --- a/Scripts/Webenv/centos-web.conf +++ /dev/null @@ -1,33 +0,0 @@ -# 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. -# -# ------------------------------------------------------------------ -# $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" - -# 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/" diff --git a/Scripts/Webenv/webenv.cgi b/Scripts/Webenv/webenv.cgi new file mode 100755 index 0000000..d137638 --- /dev/null +++ b/Scripts/Webenv/webenv.cgi @@ -0,0 +1,58 @@ +#!/usr/bin/python +# +# centos-web.cgi -- This script is an effort to organize The CentOS +# Project information in XHTML format for its publication on the +# Internet. The script is organized in a package named `Apps' which, +# in turn, is subdivided in other packages (e.g., `Home', `Sponsors', +# etc.) to cover each web application the organization demands. +# +# Notice that some of the web applications demanded (e.g., Wiki, +# Lists, Forums, Bugs, etc.) are not included in this script, but +# linked to their own locations. Moreover, in order to provide +# accessability among all different web applications, they need to be +# redesigned to share one unique visual style and one unique top-level +# navigation bar so the current web application can be remarked. +# +# Copyright (C) 2011 Alain Reguera Delgado +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# ------------------------------------------------------------------ +# $Id$ +# ------------------------------------------------------------------ + +import cgi +import cgitb; cgitb.enable() + +def main(): + + qs = cgi.parse() + + if 'app' in qs: + app = qs['app'][0].lower() + else: + app = 'home' + + if app == 'home': + from Apps.Home import page + elif app == 'sponsors': + from Apps.Sponsors import page + else: + from Apps.Unknown import page + + print 'Content-type: text/html' + "\n" + print page.main() + +if __name__ == '__main__': main() diff --git a/Scripts/Webenv/webenv.conf b/Scripts/Webenv/webenv.conf new file mode 100644 index 0000000..83b4ce8 --- /dev/null +++ b/Scripts/Webenv/webenv.conf @@ -0,0 +1,33 @@ +# 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. +# +# ------------------------------------------------------------------ +# $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" + +# 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/"