Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, but am not sure if that is deprecated or if there is a better way of doing this.

share|improve this question
up vote 1 down vote accepted

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

share|improve this answer

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

share|improve this answer
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 – Corey Farwell 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 – Corey Farwell 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? – Corey Farwell Sep 1 '11 at 21:21

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

share|improve this answer
Which sample – Corey Farwell Sep 2 '11 at 2:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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