wiki/. moinmodpy.py winewiki.conf

Dimi Paun dimi at users.sourceforge.net
Fri May 27 16:47:19 CDT 2005


ChangeSet ID:	1117230439971176296779053
CVSROOT:	/cvsroot/wine
Module name:	wiki
Changes by:	dimi at sc8-pr-cvs1.sourceforge.net	2005/05/27 14:47:19

Modified files:
	.              : moinmodpy.py winewiki.conf 

Log message:
	Switch the Wine Wiki from CGI to mod_python for performance.
	It seems to be impossible to get a root mod_python wiki without
	using the moinmodpy.py wrapper script, which is why we use it
	even if our mod_python doesn't suffer from the bug that used
	to require the moinmodpy.py hack.


Old revision  New revision  Changes     Path
 1.1           1.2           +1 -1       wiki/moinmodpy.py
 1.3           1.4           +23 -16     wiki/winewiki.conf

Index: wiki/moinmodpy.py
diff -u -p wiki/moinmodpy.py:1.1 wiki/moinmodpy.py:1.2
--- wiki/moinmodpy.py	27 May 2005 21:47:19 -0000
+++ /dev/null	27 May 2005 21:47:19 -0000
@@ -33,7 +33,7 @@ import sys
 
 # Path of the directory where wikiconfig.py is located.
 # YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP.
-sys.path.insert(0, '/path/to/wikiconfig')
+sys.path.insert(0, '/var/www/wine/wiki')
 
 # Path to MoinMoin package, needed if you installed with --prefix=PREFIX
 # or if you did not use setup.py.
Index: wiki/winewiki.conf
diff -u -p wiki/winewiki.conf:1.3 wiki/winewiki.conf:1.4
--- wiki/winewiki.conf	27 May 2005 21:47:19 -0000
+++ /dev/null	27 May 2005 21:47:19 -0000
@@ -1,21 +1,28 @@
 <VirtualHost *:80>
-   ServerName wiki.winehq.org
-   ServerAlias wiki.winehq.com
-   Alias /wiki/ "/usr/share/moin/htdocs/"
-   Alias /favicon.ico "/var/www/wine/wiki/favicon.ico"
-   Alias /logo.png "/var/www/wine/wiki/logo.png"
-   ScriptAlias / "/var/www/wine/wiki/moin.cgi/"
-   # Serving it up via mod_python, when the wiki root problem gets solved
-   #<Location /wine/wiki>
-   #    SetHandler python-program
-   #    PythonPath "['/var/www/wine/wiki']+sys.path"
-   #    PythonHandler MoinMoin.request::RequestModPy.run
-   #</Location>
-</VirtualHost>
+    ServerName wiki.winehq.org
+    ServerAlias wiki.winehq.com
+    Alias /favicon.ico "/var/www/wine/wiki/favicon.ico"
+    Alias /logo.png "/var/www/wine/wiki/logo.png"
+
+    # Rewrite urls
+    RewriteEngine On
+    RewriteLogLevel 0
+    # map /wiki static files to Moin htdocs
+    RewriteRule ^/wiki/(.*)$ /usr/share/moin/htdocs/$1 [last]
+    # map everything else to server script
+    RewriteRule ^(.*)$ /var/www/wine/wiki/moinmodpy.py$1
 
-<Directory /var/www/wine/wiki/>
-        Options ExecCGI
+    <Directory "/var/www/wine/wiki">
+        # These are copied from the default cgi-bin directory
+        AllowOverride None
+        Options None
         Order allow,deny
         Allow from all
-</Directory>
 
+        # Modpy stuff
+        AddHandler python-program .py
+        PythonPath "['/var/www/wine/wiki'] + sys.path"
+        PythonHandler moinmodpy
+    </Directory>
+
+</VirtualHost>



More information about the wine-cvs mailing list