[Moin-user] Running ssl (port 443) on apache, can't attach files, wrong url in email from MoinMoin

David Obler david_obler at sesda.com
Tue Mar 25 06:52:02 EST 2003


I have been reading the list for some time, and I am still stumped by this.
The problem is that when MoinMoin sends out email, it places the http:// 
not https://
as the url for the subscribed page.

Another problem that we think is related is that we cannot attach files 
through the interface.
We have enable attachments.

Any advice that you have on either of these issues (that may be related) 
is gratefully appreciated.


Dave Obler

Here are the vital stats of our webserver

 $Id: moin.cgi,v 1.2 2002/03/11 21:48:48 jhermann Exp $
Apache/1.3.27 Server at omiwww.gsfc.nasa.gov Port 443
Python 1.5.2 (#1, Jan 31 2003, 10:58:35)
[GCC 2.96 20000731]
(Red Hat Linux 7.3 2 on linux-i386)

Here is the original bug report:

The moinmoin software can't seem to handle a https:// url. Instead it changes it
to an http://. This makes it email out misinformation when people subscribe to
pages and is probably related to the problems with file attachments.

Here is one of the fixes we tried that reported a configuration error:

Since Apache with mod_ssl does not give SSL_* environment variable to
CGI, MoinMoin.webapi.isSSL() gives wrong result. That causes that
TWikiDraw pictures does not appear if MoinMoin is over SSL/TLS (https).

  def isSSL():
      """ Return true if we are on a SSL (https) connection. """
      return os.environ.get('SSL_PROTOCOL', ') != ' or \
+            os.environ.get('HTTPS', ') != ' or \
             os.environ.get('SSL_PROTOCOL_VERSION', ') != '

Here is an analysis of what we think is wrong

The os.environ variables in Python refer to the shell variables set when the
program runs. To change it, you'd just need to find out what user the wiki runs
as and set an envrionment variable somewhere to what it needs.

Further information on os.environ can be found at:


Other Python programs work often the same way. You may find editing the Python
scripts before they reach the Python interpreter does what you want.

Thanks so much,

David Obler

More information about the Moin-user mailing list