[Moin-user] Fwd: help needed with python mod and apache2 root domain setup

Peter Colton contact at bissybox.com
Mon Mar 12 10:35:30 EDT 2007



Hello all,

I been trying to setup a apache virtual domain with python mod and no cgi.
 For a root domain but up to now I have had no luck with this task. There is
 no problems with the domain using python mod and RedirectMatch and no cgi,
 all works perfect.

I would prefer the domain's urls is in the form of
 http://domain-name/some-page
Instead as it is now, in the form of
 http://domain-name/MyWiki/some-page

I have been using the apache mod rewrite and I tryed and tryed to get the url
to rewrite but nothing. The moinmoin howtos I been reading on python mod
apache and root domain seem to be using a cgi setup for the moin domain. I
have disable the cgi by not having in use the ScriptAlias  for moin.cgi
" ScriptAlias /MyWiki  /var/www/test-site/MyWiki/moin.cgi"
The cgi apache mod is all so disabled.
The apache  virtual domain config uses the rule
"PythonOption Location /MyWiki/"
So there no need for any cgi apache mod.

The apache mods I do have enabled are :
alias.load  authz_host.load  mime.load  mod_python.load  rewrite.load

Below I am posting my apache config files for my apache virtual host and a
copy of the " MoinMoin Diagnosis " out put for my setup info:

If some one can see where I am going wrong I would be gratefull for some
pointers.

	Regards

                      Peter Colton

----------------------------------------------------------------------------

admin at wiki:/etc/apache2/sites-available$ cat test-site
<VirtualHost *>

        # Change wiki domain name
        ServerName      www.wiki-1.com

        # Change location for wiki root directory
        DocumentRoot    /var/www/test-site

        # Change location for wiki root directory
        <Directory /var/www/test-site/>
                Order allow,deny
                allow from all
        </Directory>

        # Redirect / to /MyWiki/
        <Directory /var/www/test-site/>
        RedirectMatch ^/$ /MyWiki/
        </Directory>

        <Location /MyWiki/>
        SetHandler python-program

        # Add the path of your wiki directory
        PythonPath "['/var/www/test-site/MyWiki/','/etc/moin/']+sys.path"
        PythonHandler MoinMoin.request::RequestModPy.run

        # Location value must match the Apache Location value!
        PythonOption Location /MyWiki/

        # With this directive different subinterpreters with completely
        # separate namespaces will be used for each wiki
        PythonInterpreter /MyWiki/

        PythonDebug On
        </Location>

        ErrorLog /var/log/apache2/test-site-error.log

        LogLevel warn

        CustomLog /var/log/apache2/test-site-access.log combined
        ServerSignature On

</VirtualHost>

-----------------------------------------------------
admin at wiki:/etc/apache2/conf.d$ cat wiki

Alias  /wiki/ /usr/share/moin/htdocs/

# forbid access to the entire filesystem by default
<Directory />
  Options None
  AllowOverride None
  Order deny,allow
  Deny from all
</Directory>

<Directory "/usr/share/moin/htdocs/">
   Order deny,allow
   Allow from all
</Directory>

------------------------------------------------------

http://www.wiki-1.com/MyWiki/?action=test

MoinMoin Diagnosis
======================

Release 1.5.3
Revision release
Python version 2.4.4 (#1, Jan 13 2007, 17:48:09)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]
Python installed to /usr
PyXML is NOT installed
Python Path:
   /var/www/test-site/MyWiki/
   /etc/moin/
   /usr/lib/python24.zip
   /usr/lib/python2.4
   /usr/lib/python2.4/plat-linux2
   /usr/lib/python2.4/lib-tk
   /usr/lib/python2.4/lib-dynload
   /usr/local/lib/python2.4/site-packages
   /usr/lib/python2.4/site-packages
   /var/lib/python-support/python2.4
   /usr/lib/site-python
Checking directories...
    data directory tests OK (set to '/var/lib/moin-MyWiki/test-site/data')
    user directory tests OK (set to
'/var/lib/moin-MyWiki/test-site/data/user')

Server Environment:
    ONLY AVAILABLE FOR LOCAL REQUESTS ON THIS HOST!

Unit Tests:

---------------------------------------------------------

-------------------------------------------------------




More information about the Moin-user mailing list