[csw-devel] SF.net SVN: gar:[20640] csw/mgar/gar/v2/lib/web

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Apr 7 16:25:03 CEST 2013


Revision: 20640
          http://gar.svn.sourceforge.net/gar/?rev=20640&view=rev
Author:   wahwah
Date:     2013-04-07 14:25:03 +0000 (Sun, 07 Apr 2013)
Log Message:
-----------
lib/web/README: Moved the example config

It's a long text, so it's better as a separate file.

I couldn't find instructions how to set up lighttpd with wsgi, maybe there
isn't a ready to go solution like there is for Apache.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/web/README
    csw/mgar/gar/v2/lib/web/example-apache.conf
    csw/mgar/gar/v2/lib/web/example-lighttpd.conf

Modified: csw/mgar/gar/v2/lib/web/README
===================================================================
--- csw/mgar/gar/v2/lib/web/README	2013-04-07 13:31:10 UTC (rev 20639)
+++ csw/mgar/gar/v2/lib/web/README	2013-04-07 14:25:03 UTC (rev 20640)
@@ -1,57 +1,6 @@
 Web-serving components of the checkpkg infrastructure.
 
-Configuring 'pkgdb' and 'releases' scripts with mod_wsgi on Apache:
+Example Apache and lighttpd configurations are available:
 
-  DocumentRoot "/opt/csw/apache2/share/htdocs/buildfarm"
-  ServerName buildfarm.example.com
-
-  # General WSGI settings
-  <IfModule wsgi_module>
-    WSGIDaemonProcess buildfarm.example.com display-name=pkgdb threads=15 maximum-requests=1000
-    WSGIProcessGroup buildfarm.example.com
-  </IfModule>
-
-  # Static files such as CSS stylesheets.
-  Alias /pkgdb-static /path/to/gar/v2/lib/web/static
-  <Directory /path/to/gar/v2/lib/web/static>
-    Order allow,deny
-    Allow from all
-    Options +Indexes
-  </Directory>
-
-  # http://buildfarm.example.com/pkgdb/
-  <IfModule wsgi_module>
-    WSGIScriptAlias /pkgdb /path/to/gar/v2/lib/web/pkgdb_web.py/
-  </IfModule>
-  <Location /pkgdb>
-    Order allow,deny
-    Allow from all
-  </Location>
-
-  <Directory /opt/csw/apache2/share/htdocs/buildfarm/pkgdb>
-    Order allow,deny
-    Allow from all
-  </Directory>
-
-  # I don't know why the Deny/Allow rules need to be duplicated, but I haven't
-  # been able to run the thing with just one set of permissions.
-  <Directory /opt/csw/apache2/share/htdocs/buildfarm/releases>
-    Order deny,allow
-    Deny from all
-    Allow from 1.2.3.4
-  </Directory>
-
-  # http://buildfarm.example.com/releases/
-  <IfModule wsgi_module>
-    WSGIScriptAlias /releases /path/to/gar/v2/lib/web/releases_web.py/
-  </IfModule>
-  <Location /releases>
-    Order deny,allow
-    Deny from all
-    Allow from 1.2.3.4
-
-    AuthName "Package releases REST interface"
-    AuthType Basic
-    AuthUserFile /path/to/buildfarm-users.htpasswd
-    Require valid-user
-  </Location>
+  - example-apache.conf
+  - example-lighttpd.conf

Modified: csw/mgar/gar/v2/lib/web/example-apache.conf
===================================================================
--- csw/mgar/gar/v2/lib/web/example-apache.conf	2013-04-07 13:31:10 UTC (rev 20639)
+++ csw/mgar/gar/v2/lib/web/example-apache.conf	2013-04-07 14:25:03 UTC (rev 20640)
@@ -4,53 +4,58 @@
 #
 # This file is an example apache configuration used to run the application.
 
-  <Location /pkgdb>
+Configuring 'pkgdb' and 'releases' scripts with mod_wsgi on Apache:
+
+  DocumentRoot "/opt/csw/apache2/share/htdocs/buildfarm"
+  ServerName buildfarm.example.com
+
+  # General WSGI settings
+  <IfModule wsgi_module>
+    WSGIDaemonProcess buildfarm.example.com display-name=pkgdb threads=15 maximum-requests=1000
+    WSGIProcessGroup buildfarm.example.com
+  </IfModule>
+
+  # Static files such as CSS stylesheets.
+  Alias /pkgdb-static /path/to/gar/v2/lib/web/static
+  <Directory /path/to/gar/v2/lib/web/static>
     Order allow,deny
     Allow from all
+    Options +Indexes
+  </Directory>
 
-    <IfModule python_module>
-      SetHandler python-program
-      PythonPath "sys.path + ['/path/to/gar/v2/lib/web', '/path/to/gar/v2']"
-      PythonHandler modpython_gateway::handler
-      PythonOption wsgi.application pkgdb_web::main
-      PythonOption SCRIPT_NAME /pkgdb
-      PythonDebug on
-    </IfModule>
-  </Location>
-  # In this example, /path/to/documentroot is the document root setting for
-  # that virtual host.
-  <Directory /path/to/documentroot/pkgdb>
+  # http://buildfarm.example.com/pkgdb/
+  <IfModule wsgi_module>
+    WSGIScriptAlias /pkgdb /path/to/gar/v2/lib/web/pkgdb_web.py/
+  </IfModule>
+  <Location /pkgdb>
     Order allow,deny
     Allow from all
-  </Directory>
+  </Location>
 
-  Alias /pkgdb-static /path/to/gar/v2/lib/web/static
-  <Directory /path/to/gar/v2/lib/web/static>
+  <Directory /opt/csw/apache2/share/htdocs/buildfarm/pkgdb>
     Order allow,deny
     Allow from all
-    Options +Indexes
   </Directory>
 
   # I don't know why the Deny/Allow rules need to be duplicated, but I haven't
   # been able to run the thing with just one set of permissions.
-  <Directory /path/to/documentroot/releases>
+  <Directory /opt/csw/apache2/share/htdocs/buildfarm/releases>
     Order deny,allow
     Deny from all
-    # Allowing access only from chosen hosts.
-    # Allow from 192.168.1.0/24
+    Allow from 1.2.3.4
   </Directory>
 
+  # http://buildfarm.example.com/releases/
+  <IfModule wsgi_module>
+    WSGIScriptAlias /releases /path/to/gar/v2/lib/web/releases_web.py/
+  </IfModule>
   <Location /releases>
     Order deny,allow
     Deny from all
-    # Allowing access only from chosen hosts.
-    # Allow from 192.168.1.0/24
-    <IfModule python_module>
-      SetHandler python-program
-      PythonPath "sys.path + ['/path/to/gar/v2/lib/web', '/path/to/gar/v2']"
-      PythonHandler modpython_gateway::handler
-      PythonOption wsgi.application releases_web::main
-      PythonOption SCRIPT_NAME /releases
-      PythonDebug on
-    </IfModule>
+    Allow from 1.2.3.4
+
+    AuthName "Package releases REST interface"
+    AuthType Basic
+    AuthUserFile /path/to/buildfarm-users.htpasswd
+    Require valid-user
   </Location>

Modified: csw/mgar/gar/v2/lib/web/example-lighttpd.conf
===================================================================
--- csw/mgar/gar/v2/lib/web/example-lighttpd.conf	2013-04-07 13:31:10 UTC (rev 20639)
+++ csw/mgar/gar/v2/lib/web/example-lighttpd.conf	2013-04-07 14:25:03 UTC (rev 20640)
@@ -16,7 +16,7 @@
 ## PythonPath "sys.path + ['.../gar/v2/lib/web', '.../gar/v2']"
 fastcgi.server = (
 "/pkgdb_web.py" =>
-(( 
+((
    "socket" => "/tmp/fastcgi-pkgdb.socket",
    "bin-path" => ".../gar/v2/lib/web/pkgdb_web.py",
    "max-procs" => 1,
@@ -26,7 +26,7 @@
    "check-local" => "disable"
 )),
 "/releases_web.py" =>
-(( 
+((
    "socket" => "/tmp/fastcgi-releases.socket",
    "bin-path" => ".../gar/v2/lib/web/releases_web.py",
    "max-procs" => 1,

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list