I tried to change two things in my installation of MoinMoin at the same time. Not good. I upgraded MoinMoin to 1.7.1 and, at the same time, I moved from serving it via a relative path (http://blah.com/mywiki) to the top level of it’s own host (http://mywiki.blah.com/). That killed it.
After upgrading to 1.7.1 I started getting Internal Server Error for every page and in my log:
ImportError: cannot import name RequestCGI Premature end of script headers: moin.cgi
The simple fix was to update the moin.cgi grabbing the latest from /usr/share/moin/server.
Once that was fixed, the site came back. However, all the Javascript and stylesheets were missing, due to HTML such as:
<script type="text/javascript" src="//common/js/common.js"></script>
I had been a little overzealous when moving away from the relative path method of serving the wiki. In the configuration file for my wiki in /etc/moin/<my wiki name>.py I had cleared:
url_prefix = '/'
That URL prefix is used for the static content, such as Javascript and stylesheets…
The fix was to change it to a path matching an alias in my Apache configuration file. So, in /etc/moin/<my wiki name>.py I set it to:
url_prefix = '/static'
Matching the setting in my Apache configuration file of:
Alias /static/ "/usr/share/moin/htdocs/
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.