From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1O7Cli-0006iC-Hw for garchives@archives.gentoo.org; Wed, 28 Apr 2010 19:18:03 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A7C2EE07E1; Wed, 28 Apr 2010 19:17:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6752FE07E1 for ; Wed, 28 Apr 2010 19:17:54 +0000 (UTC) Received: from corvid.gentoo.org (corvid.gentoo.org [208.92.234.79]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id CE2F21B40CA for ; Wed, 28 Apr 2010 19:17:53 +0000 (UTC) Received: by corvid.gentoo.org (Postfix, from userid 2104) id C3FCF2C06D; Wed, 28 Apr 2010 19:17:52 +0000 (UTC) From: "Joshua Saddler (nightmorph)" To: gentoo-doc-cvs@lists.gentoo.org Subject: [gentoo-doc-cvs] gentoo commit in xml/htdocs/proj/en/gdp/doc: gorg.xml X-VCS-Repository: gentoo X-VCS-Files: gorg.xml X-VCS-Directories: xml/htdocs/proj/en/gdp/doc X-VCS-Committer: nightmorph X-VCS-Committer-Name: Joshua Saddler Content-Type: text/plain; charset=utf8 Message-Id: <20100428191752.C3FCF2C06D@corvid.gentoo.org> Date: Wed, 28 Apr 2010 19:17:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-doc-cvs@lists.gentoo.org Reply-to: docs-team@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 73781b05-350f-4379-a48e-0e9db6f4cacd X-Archives-Hash: 9a13fc8610873d9d67edbfae8c28f8fa nightmorph 10/04/28 19:17:52 Added: gorg.xml Log: Added gorg guide to our stuff, after finding the raw unformatted text i= n the cached interwebs. neysx's site is down, and this stuff is too valua= ble to lose. i rewrote the guideXML and cleaned it up where necessary. in= spired by bug 317609. Revision Changes Path 1.1 xml/htdocs/proj/en/gdp/doc/gorg.xml file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/gdp= /doc/gorg.xml?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/gdp= /doc/gorg.xml?rev=3D1.1&content-type=3Dtext/plain Index: gorg.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D How to Install Gorg This guide describes how to install and configure gorg. 1 2010-04-28 Introduction

Gorg is a back-end XSLT processor for an XML-based web site. XML source f= iles are transformed and served on-the-fly. Output files and their dependencie= s are cached. Its main features are:=20

  • Works with apache, lighttpd or webrick (ruby's own web server)
  • Uses efficient caching
  • Generates consistent HTTP headers when several web nodes serve the sa= me content
  • Implements its own compression (aka mod_gzip), i.e. it does not rely = on the web server to compress its output
  • Supports client-side caching
  • Your XSL can accept and write cookies
  • Provides its own search engine (site indexing will be substantially u= pdated in a later version)

Gorg allows you to serve your own local copy of http://www.gentoo.org. It can use either a cgi or a fastcgi sc= ript with apache or lighttpd, or even use its own stand-alone web server. Its = name is short for Gentoo.org because it was created with Gentoo's s= ite in mind when it was felt that a replacement for AxKit was required.

Gorg has been tested on x86, amd64, alpha, sparc, ppc, mips & hppa wi= th the following packages:

>=3Dnet-www/apache-2.0.55
>=3Dwww-apache/mod_fcgid-1.0.8=20

>=3Ddev-lang/ruby-1.8.4
>=3Ddev-libs/fcgi-2.4.0 =20
>=3Ddev-ruby/ruby-fcgi-0.8.6
>=3Ddev-libs/libxml2-2.6.23
>=3Ddev-libs/libxslt-1.1.15
(In the unlikely case you want to fiddle with gorg's own search =
engine)
>=3Ddev-db/mysql-4.0.26 (up to and including 5.*)
>=3Ddev-ruby/ruby-dbi-0.0.21
>=3Ddev-ruby/mysql-ruby
Installing Gorg

Define your USE flags to allow apache with or without mod_fcgi, or not de= pending on how you want to use it. The mysql USE flag is only required for= the integrated search engine.

You might have to keyword some dependencies for your architecture. You ca= n keyword the required packages or accept a foreign architecture. gorg has = been installed and tested on x86, amd64, alpha, sparc, ppc, mips & hppa.
(With apache support)
# echo www-servers/gorg fastcgi apache -mysql >> /etc/portage/package.=
use

(Without apache support)
# echo www-servers/gorg -fastcgi -apache -mysql >> /etc/portage/packag=
e.use

(Check dependencies are available for your architecture)
# emerge -pv gorg

(Install gorg)
# emerge gorg
Configuring Gorg
Configuring apache You may skip this section if you are not going to use apache at all.=20

If you want to use fastcgi, which you should anyway, you'll need to add <= c>-D FCGID to the APACHE2_OPTS variable in /etc/conf.d/apache2.

Then, integrate the apache configuration directives from the provided sam= ple file /etc/gorg/vhost.sample into your own vhost configs, e.g= .: /etc/apache2/vhosts.d/10_gorg.conf. Comments in the sample c= onfig file will guide you.

Finally, copy or symlink the (c)cgi scripts from /usr/lib/ruby/site_ruby/<ruby-version>/gorg/fcgi-bin/gorg.fcg= i and /usr/lib/ruby/site_ruby/<ruby-version>/gorg/cgi-bin/{gorg,sea= rch}.cgi into your web site (f)cgi directories and check they are executable. You should copy search.cgi only if you are going to use the inte= grated search engine.

Configuring gorg

Create a copy of the sample config file /etc/gorg/gorg.conf.sample<= /path> named /etc/gorg/gorg.conf and edit it. Comments will = help you define your own parameters. You need to define at least your web docu= ment root directory.

If you do not want to use the default /etc/gorg/gorg.conf co= nfig file, you'll need to define an environment variable called GORG_CONF that points to the config file.

If you use caching, and it is recommended that you do so, do make sure th= at the cache directory defined in your config file has proper permissions. If yo= u use apache, the apache user needs full access to that directory.
Getting the missing files

Assuming you'll serve your local copy of CVS, or a copy if, or symlinks t= o it, you need to download some files from the dyn directory.

(Go to your htdocs directory)
$ cd /path/to/your/document/root
/htdocs $ cd dyn
/htdocs $ wget -O news-index.xml http://www.gentoo.org/dyn/news-index.=
xml?passthru=3D1
/htdocs $ cd ..
(Do the same for any other data you may need from the /dyn direc=
tory)

You also need to make the pictures available to your browser. The images directory is one level above htdocs. Jus= t define a symlink to it and you're set.

/htdocs $ ln -si ../images images

(It should look like this:)
/htdocs $ ls -l
drwxr-xr-x   3 neysx users  128 Sep 14 17:45 css
drwxr-xr-x  31 neysx users  744 Oct 26 00:03 doc
drwxr-xr-x   3 neysx users  544 Nov  2 16:53 dtd
drwxr-xr-x   3 neysx users  168 Nov  3 16:24 dyn
-rw-r--r--   1 neysx users 1406 Jun  7  2003 favicon.ico
lrwxrwxrwx   1 neysx users   10 Oct 21 22:29 images -> ../images/
-rw-r--r--   1 neysx users  190 Nov  9  2002 index.xml
drwxr-xr-x  16 neysx users  384 Apr  1  2004 main
drwxr-xr-x  17 neysx users 6960 Nov  3 15:34 news
drwxr-xr-x   8 neysx users  192 Oct 23 14:52 proj
drwxr-xr-x   4 neysx users   96 Sep 17 14:05 security
drwxr-xr-x   3 neysx users  736 Nov  2 16:40 xsl

Your local CVS probably shows a few more entries, but at least those ment= ioned above should be available and kept up-to-date. Also remember to keep your images directory current.

Running Gorg
The stand-alone web server

The easiest way to try it out is to run gorg. It should display so= mething like:

$ gorg

Starting the Gorg web server on port 8008

Hit Ctrl-C or type "kill 31479" to stop it

Point your browser to http://localhost:8008 and you should see= your favorite site.

With apache

Restart apache (/etc/init.d/apache2 restart) and visit http://localhost assuming you're installing on your own workstation.

If you used static fastcgi servers, you should see them with top -u apache.

If it doesn't work, try the stand-alone web server (type gorg). If= this doesn't work either, check your /etc/gorg/gorg.conf config f= ile. If it does work, please check your apache config files and your logs.