[csw-devel] SF.net SVN: gar:[13918] csw/mgar/gar/v2/lib/web/example-apache.conf

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue Mar 22 10:44:24 CET 2011


Revision: 13918
          http://gar.svn.sourceforge.net/gar/?rev=13918&view=rev
Author:   wahwah
Date:     2011-03-22 09:44:24 +0000 (Tue, 22 Mar 2011)

Log Message:
-----------
pkgdb-web: Example apache configuration

Added Paths:
-----------
    csw/mgar/gar/v2/lib/web/example-apache.conf

Added: csw/mgar/gar/v2/lib/web/example-apache.conf
===================================================================
--- csw/mgar/gar/v2/lib/web/example-apache.conf	                        (rev 0)
+++ csw/mgar/gar/v2/lib/web/example-apache.conf	2011-03-22 09:44:24 UTC (rev 13918)
@@ -0,0 +1,56 @@
+# vim:set ft=apache:
+#
+# $Id$
+#
+# This file is an example apache configuration used to run the application.
+
+  <Location /pkgdb>
+    Order allow,deny
+    Allow from all
+
+    <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>
+    Order allow,deny
+    Allow from all
+  </Directory>
+
+  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>
+
+  # 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>
+    Order deny,allow
+    Deny from all
+    # Allowing access only from chosen hosts.
+    # Allow from 192.168.1.0/24
+  </Directory>
+
+  <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>
+  </Location>


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