aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorHans de Graaff <hans@degraaff.org>2012-10-26 13:00:04 +0200
committerHans de Graaff <hans@degraaff.org>2012-10-26 13:00:04 +0200
commit7670cccf083e25676804c503582091a3eadb00cf (patch)
tree8aa8d9a6a760e2aa10c3d2f30df315f34c70ffc7 /etc
parentInitial commit (diff)
downloadgorg-7670cccf083e25676804c503582091a3eadb00cf.tar.gz
gorg-7670cccf083e25676804c503582091a3eadb00cf.tar.bz2
gorg-7670cccf083e25676804c503582091a3eadb00cf.zip
Import distributed 0.6.4 release.0.6.4
Diffstat (limited to 'etc')
-rw-r--r--etc/gorg/gorg.conf.sample149
-rw-r--r--etc/gorg/lighttpd.conf.sample118
-rw-r--r--etc/gorg/vhost.sample152
3 files changed, 419 insertions, 0 deletions
diff --git a/etc/gorg/gorg.conf.sample b/etc/gorg/gorg.conf.sample
new file mode 100644
index 0000000..c3fda72
--- /dev/null
+++ b/etc/gorg/gorg.conf.sample
@@ -0,0 +1,149 @@
+# /etc/gorg/gorg.conf: Configuration file for Gorg
+
+# Root dir, typically, your DocumentRoot
+# (f)cgi scripts find it in their environment but
+# the stand-alone webserver and the search engine need it
+root = "/home/neysx/gentoo.org/gentoo/xml/htdocs"
+
+# Make webrick listen on given IP (IP onlyu, no host name)
+listen = 127.0.0.1
+
+# Mount paths that are not under the root directory (used by stand-alone web server only)
+# eg. to mount /cgi-bin which is usually not under the document root
+# Note: Those directories will be handled by the stock FileHandler, ie. not by gorg
+mount = /cgi-bin on /home/neysx/gentoo.org/gentoo/xml/cgi-bin
+mount = /images on /home/neysx/gentoo.org/gentoo/xml/images
+
+# Should gorg accept cookies and pass $param=$value to the xsl transform
+# Default is no (anything but 1 is no)
+acceptCookies = 1
+
+# Only read so many lines in xml files to identify stylesheets, use 0 to scan whole file
+headXSL = 12
+
+# Default stylesheet, relative to root dir
+defaultXSL = "/xsl/guide.xsl"
+
+# Only used by fastCGI, auto exit after given number of requests (0 means no)
+# The fcgi process manager will restart a new instance automatically
+# NB: it will NOT exit before at least 1 full minute has elapsed even if you set a very low value
+# If you want a really short-lived version, use the cgi instead
+# mod_fcgid does its own process recycling and this feature will be obsoleted in an later version
+autoKill = 5000
+
+# Allow return of unprocessed xml file if passthru==(anything but 0) appears in URI params
+# 0==No, anything else==Yes
+passthru = 1
+
+# Pass pathname of requested file in named parameter to the xsl transform
+# [a-zA-Z]+ , anything else is ignored and no param is passed
+# Default is "link"
+linkParam = link
+
+# Pass a param named httphost to the style sheet (== host value from HTTP header)
+# 0 or nothing (default) disables this feature
+# * will pass the value as received from the user agent or none (http/1.0)
+# name alias1 alias2... will pass name when the value sent by the user agent
+# matches exactly any of name alias1 alias2...
+# if any alias is *, any value (even nil) will match and name will be passed
+# When no value matches, the value received from the user agent is passed
+#httphost = mysite www.mysite.org mysite.org alias.mysite.org
+
+# Cache directory. Directory must exist and be writable by whoever runs the server (e.g. apache)
+# It must also be writable by the user who runs the stand-alone web server, i.e. not the apache user
+# if you want to use both web servers. You can even run both at the same time.
+# Default is no cache
+cacheDir = "/var/cache/gorg"
+
+# Number of seconds after which a document is considered too old, 0=never
+# Can be used to force a refresh or to stress-test the system
+#cacheTTL = 86400 # 1 day
+cacheTTL = 864000 # or 10 days
+#cacheTTL = 600 # or 10 minutes....
+
+# Use a tree of directories under cacheDir that matches the site tree
+# Use when your system has problems coping with a huge single cache dir
+# 0 means no tree (all files in cacheDir) and is the default
+# If you use this, make sure you clean up the cache with gorg -C regularly
+cacheTree = 1
+
+# Max size of cache in megabytes
+# Please note that cacheSize is used ONLY when cleaning up either
+# when cacheTree==0 and a clean-up is started based on cacheWash (see below)
+# or when cacheTree!=0 and `gorg -C` is run
+cacheSize = 250
+
+# Max number of files in a given cache directory
+# Please note that this limit is also enforced when cacheTree == 0
+# in which case it means the max total number of files in the whole cache
+maxFiles = 2000
+
+# Support gzip http encoding (ie. mod_deflate)
+# 0 means no compression *and* no support for gzip encoding.
+# 1-9 gives compression level, 1 least compressed, 9 max compressed
+# Cached pages use the same compression level
+# Default is 2
+zipLevel = 2
+
+# Clean cache automatically and regularly when a store into the cache occurs.
+# gorg cleans up if random(value) < 10, i.e.
+# Set to 0 to disable and rely on gorg --clean-cache being run regularly
+# a value<=10 means at every call,
+# 100 means 10 percent of stores will also clean the cache
+# 1000 means 10 permille (cacheSize will be checked only once every 100 stores)
+# Note: gorg only tries to clean the dir it caches to, not the whole cache tree
+# Use `gorg -C` or `gorg --clean-cache` to clean up whole cache
+cacheWash = 0
+
+# Level of logging that goes to syslog
+# OFF, FATAL, ERROR, WARN, INFO, DEBUG = 0, 1, 2, 3, 4, 5
+logLevel = 4
+
+#
+# Used only by stand-alone webserver
+#
+
+# Send hit stats to syslog/stderr/a file
+accessLog = "syslog"
+
+# Listen on port (must be >1023 to be run by non-root)
+port = 8008
+
+#
+# Search engine parameters
+#
+
+# Connect string, only mysql is supported at the moment
+dbConnect = DBI:mysql:DB_NAME:HOST_NAME
+dbUser = USENAME
+dbPassword = PASSWORD
+
+# Document language can be guessed from the document itself with
+# an XPath expression. It should return the language code.
+# Only the first 5 characters will be used.
+# For instance, to use a root element's lang attribute:
+xpath_to_lang = /*[1]/@lang
+
+# If no XPath is given or no lang is found, you can use the file path as a fallback:
+# define a regexp to apply to the file path, $1 must yield the language
+# For instance, the following one applied to '/doc/en/file.xml' returns 'en'
+fpath_to_lang = ^/[^/]+/([^/]+)/.*xml$
+
+# include/exclude directives will be processed in the order they appear below.
+# First match will be used to either include or exclude the file.
+# If no match is found, file is skipped
+# Each directive should define one and only one regexp
+# Beware, regexp are not shell globs, .xml means any character followed by xml anywhere in the file name
+# .+\.xml$ means one or more characters followed by a dot and ending with xml
+# Any file that can't be processed, ie. because it is not well-formed will not be indexed
+
+exclude = ^/proj/en/gdp/tests/
+exclude = /CVS/
+exclude = ^/xsl/
+exclude = /draft/
+exclude = ^/doc/.+/handbook/2004
+exclude = metadoc\.xml$
+exclude = /inserts-.+\.xml$
+exclude = ^/dyn/
+exclude = herds/pkgList.xml
+include = ^/.+\.xml$
diff --git a/etc/gorg/lighttpd.conf.sample b/etc/gorg/lighttpd.conf.sample
new file mode 100644
index 0000000..ad0d932
--- /dev/null
+++ b/etc/gorg/lighttpd.conf.sample
@@ -0,0 +1,118 @@
+# Example lighttpd.conf for Gorg
+
+var.basedir = "/var/www/www.gentoo.org"
+var.logdir = "/var/log/lighttpd"
+var.statedir = "/var/lib/lighttpd"
+var.cache = "/var/cache/gorg"
+
+server.modules = (
+# "mod_rewrite",
+# "mod_redirect",
+ "mod_alias",
+ "mod_access",
+# "mod_status",
+# "mod_setenv",
+# "mod_userdir",
+ "mod_compress",
+ "mod_accesslog"
+)
+
+include "mime-types.conf"
+
+server.username = "lighttpd"
+server.groupname = "lighttpd"
+
+server.document-root = var.basedir + "/htdocs"
+server.pid-file = "/var/run/lighttpd.pid"
+
+server.errorlog = var.logdir + "/error.log"
+accesslog.filename = var.logdir + "/access.log"
+accesslog.format = "%h %t \"%r\" %b %s %T \"%{User-Agent}i\" \"%{Referer}i\" %I %O"
+
+server.indexfiles = ("index.xml", "index.html" )
+
+server.tag = "Lightppd 1.4.8/Gentoo 2006.0"
+
+server.follow-symlink = "enable"
+
+server.port = 80
+
+server.errorfile-prefix = var.basedir + "/errors/"
+
+static-file.exclude-extensions = (".cgi", ".fcgi")
+
+dir-listing.activate = "disable"
+dir-listing.hide-dotfiles = "enable"
+dir-listing.exclude = ("^\.", "~$", "\.\.")
+
+url.access-deny = ("~", ".inc")
+
+# userdir.path = "public_html"
+# userdir.exclude-user = ("root")
+
+# ssl.engine = "enable"
+# ssl.pemfile = "server.pem"
+
+# status.status-url = "/server-status"
+# status.config-url = "/server-config"
+
+compress.cache-dir = var.cache
+compress.filetype = ("text/plain", "text/html", "text/css")
+
+$HTTP["url"] =~ "^/xsl/" {
+ url.access-deny = ( ".xsl" )
+}
+
+$HTTP["url"] =~ "^/dyn/doc-snapshots/" {
+ dir-listing.activate = "enable"
+}
+
+# url.rewrite = (
+# "^/$" => "/server-status"
+# )
+
+# url.redirect = (
+# "^/wishlist/(.+)" => "http://www.123.org/$1"
+# )
+
+server.modules += ("mod_cgi")
+alias.url = ( "/cgi-bin/" => var.basedir + "/cgi-bin/"
+)
+
+$HTTP["url"] =~ "^/cgi-bin/" {
+ # disable directory listings
+ dir-listing.activate = "disable"
+ # only allow cgi's in this directory
+ cgi.assign = ( ".cgi" => "" )
+}
+
+server.modules += ("mod_fastcgi")
+fastcgi.debug = 0
+fastcgi.server = (
+ ".xml" =>
+ ( "localhost" =>
+ (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ "bin-path" => "/var/www/www.gentoo.org/fcgi-bin/gorg.fcgi",
+ "idle-timeout" => 60,
+ "broken-scriptfilename" => "enable",
+ "bin-environment" => ( "GORG_CONF" => "/etc/gorg/gorg.conf" ),
+ "max-procs" => 5,
+ "min-procs" => 1
+ )
+ ),
+ ".rss" =>
+ ( "localhost" =>
+ (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ "bin-path" => "/var/www/www.gentoo.org/fcgi-bin/gorg.fcgi",
+ "idle-timeout" => 60,
+ "broken-scriptfilename" => "enable",
+ "bin-environment" => ( "GORG_CONF" => "/etc/gorg/gorg.conf" ),
+ "max-procs" => 5,
+ "min-procs" => 1
+ )
+ )
+ )
diff --git a/etc/gorg/vhost.sample b/etc/gorg/vhost.sample
new file mode 100644
index 0000000..2dce594
--- /dev/null
+++ b/etc/gorg/vhost.sample
@@ -0,0 +1,152 @@
+<VirtualHost www.mygentoo.org>
+ServerName www.mygentoo.org
+ServerAlias mygentoo
+DocumentRoot /var/www/www.mygentoo.org/htdocs
+ServerAdmin webman@mygentoo.org
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" common
+CustomLog "| /usr/sbin/cronolog /var/log/apache/www.mygentoo.org/%Y%m%d.%Z.www.mygentoo.org.access-log" common
+ErrorLog "| /usr/sbin/cronolog /var/log/apache/www.mygentoo.org/%Y%m%d.%Z.www.mygentoo.org.error-log"
+AddDefaultCharset utf-8
+
+<Directory /var/www/www.mygentoo.org/htdocs>
+ DirectoryIndex index.xml
+ Options +Includes -Indexes
+ AllowOverride All
+ Order Allow,Deny
+ Allow from all
+
+ # cgi mode
+ #Action gorg /cgi-bin/gorg.cgi
+
+ # fast cgi mode
+ Action gorg /fcgi-bin/gorg.fcgi
+
+ # process .xml and .rdf files through gorg
+ AddHandler gorg .xml
+ AddHandler gorg .rdf
+</Directory>
+
+ScriptAlias /cgi-bin/ /var/www/www.mygentoo.org/cgi-bin/
+Alias /fcgi-bin/ /var/www/www.mygentoo.org/fcgi-bin/
+
+# handle images and icons
+Alias /images /var/www/www.mygentoo.org/images
+Alias /icons /var/www/www.mygentoo.org/icons
+
+<Directory /var/www/www.mygentoo.org/images>
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+</Directory>
+
+<Directory /var/www/www.mygentoo.org/icons>
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+</Directory>
+
+<Directory /var/www/www.mygentoo.org/fcgi-bin>
+ AllowOverride All
+ Options ExecCGI
+ Order allow,deny
+ Allow from all
+ # You should use mod_fcgid, but just in case you insist on using mod_fastcgi:
+ #<IfModule mod_fastcgi.c>
+ # SetHandler fastcgi-script
+ #</IfModule>
+ <IfModule mod_fcgid.c>
+ SetHandler fcgid-script
+ </IfModule>
+</Directory>
+
+<Directory /var/www/www.mygentoo.org/cgi-bin>
+ AllowOverride All
+ Options ExecCGI
+ Order allow,deny
+ Allow from all
+</Directory>
+
+</VirtualHost>
+
+
+# You should use mod_fcgid, but just in case you insist on using mod_fastcgi:
+#<IfModule mod_fastcgi.c>
+# FastCgiServer /var/www/gorg/fcgi-bin/gorg.fcgi -processes 3 -restart-delay 1 -idle-timeout 300 -appConnTimeout 240
+#</IfModule>
+
+<IfModule mod_fcgid.c>
+ IdleTimeout 120
+ #IdleTimeout n (300 seconds)
+ #An idle fastcgi application will be terminated after IdleTimeout seconds.
+
+ IdleScanInterval 30
+ #IdleScanInterval n (120 seconds)
+ #The scan interval for idle fastcgi applications.
+
+ BusyTimeout 360
+ #BusyTimeout n (300 seconds)
+ #a fastcgi application will be terminated if handing a single request longer than busy timeout.
+
+ BusyScanInterval 60
+ #BusyScanInterval n (120 seconds)
+ #The scan interval for busy timeout fastcgi applications.
+
+ ErrorScanInterval 5
+ #ErrorScanInterval n (3 seconds)
+ #The scan interval for exit pending fastcgi applications.
+ #fastcgi applications will be terminated within this scanning.
+
+ ZombieScanInterval 5
+ #ZombieScanInterval n (3 seconds)
+ #The scan interval for zombie process.
+
+ ProcessLifeTime 3000
+ #ProcessLifeTime n (3600 seconds)
+ #A fastcgi application will be terminated if lifetime expired, even no error is detected.
+
+ SocketPath /var/run
+ #SocketPath path (logs/fcgidsock)
+ #The directory to put the UNIX domain socket. (UNIX only)
+
+ SpawnScoreUpLimit 24
+ #SpawnScoreUpLimit n (10)
+
+ #The spawn-speed control score up water limit.
+ #Score increases while a process is spawned or terminated, and decreases as time progresses;
+ #while the score is higher than SpawnScoreUpLimit, the spawning will be held for a while.
+ #The higher this number is, the higher speed of the spawning can be.
+
+ SpawnScore 3
+ #SpawnScore n (1)
+ #The weight of spawning. This weight will be plused to the spawn-control score on every spawn.
+ #The higher this number is, the lower speed of spawning can be.
+
+ TerminationScore 1
+ #TerminationScore n (2)
+ #The weight of termination. This weight will be plused to the score while fastcgi process terminates.
+ #The higher this number is, the lower speed of spawning can be.
+
+ MaxProcessCount 16
+ #MaxProcessCount n (1000)
+ #The max count of total fastcgi process count.
+
+ DefaultMaxClassProcessCount 8
+ #DefaultMaxClassProcessCount n (100)
+ #The maximum number of fastcgi application instances
+ #allowed to run for any one fastcgi application.
+
+ DefaultInitEnv GORG_CONF /etc/gorg/gorg.conf
+ #The default environment variables before a fastcgi application is spawned. You can set this configuration more than once.
+
+ IPCConnectTimeout 10
+ #IPCConnectTimeout n (2 seconds)
+ #The connect timeout to a fastcgi application.
+
+ IPCCommTimeout 90
+ #IPCCommTimeout n (5 seconds)
+ #The communication timeout to a fastcgi application.
+
+ OutputBufferSize 0
+ #OutputBufferSize n (64k bytes)
+ #CGI output cache buffer size.
+</IfModule>