1

I just set up uWSGI and nginx (with the uWSGI module) and would like to get MoinMoin set up. I'm running uWSGI with MoinMoin with the command below:

/usr/bin/uwsgi -s moin.sock --wsgi-file wiki/server/moin.wsgi -M -p 4

In nginx, I have it set up like this:

location / {
   uwsgi_pass unix:///mnt/moin/moin.sock;
   include uwsgi_params;
}

If I wanted MoinMoin to run on the root of my server, this would work fine, but I want my MoinMoin to run on /wiki rather than /. I changed my nginx config to reflect this:

location /wiki {
   uwsgi_pass unix:///mnt/moin/moin.sock;
   include uwsgi_params;
}

After restarting both server, the links in MoinMoin still want to go to /PageName rather than /wiki/PageName. I would think I would have to specify a setting in MoinMoin. I saw there is a url_prefix_static option for wikiconfig.py, but am not sure if that is deprecated or if there is a better way of doing this.

1

The moinmoin/uWSGI example has been updated to include suburi configuration

http://projects.unbit.it/uwsgi/wiki/Example#MoinMoinonlinenow

0

According to this howto url_prefix_static is the official way for doing this.

5
  • That only changes the prefix of the static files. If I click on an internal link to a different wiki page, it still takes me to /WikiPage instead of /wiki/WikiPage Sep 1 '11 at 19:51
  • Oh, I see. You should also change WSGIScriptAlias / /path/to/your/moin.wsgi to WSGIScriptAlias /wiki /path/to/your/moin.wsgi in your Apache config.
    – Alex
    Sep 1 '11 at 19:56
  • I'm using nginx, not Apache Sep 1 '11 at 20:57
  • Try to add uwsgi_param SCRIPT_NAME /wiki; to your location section
    – Alex
    Sep 1 '11 at 21:03
  • So now the content is linked correctly, but the static content doesn't work. What should I set for url_prefix_static? No matter what I put it seems to think it's a wiki page. Also, what does uwsgi_param SCRIPT_NAME /wiki; even do? Sep 1 '11 at 21:21
0

The sample wikiconfig.py shows how to fix url_prefix_static for non-root-URL wikis.

1
  • Which sample wikiconfig.py? Sep 2 '11 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.