Question

Ghost, Moin Moin and Nginx

Posted July 27, 2014 4.7k views

I’m currently running a Ghost/Ubuntu 12.04 droplet and would very much like to add a separate server block running a moin moin wiki. I’m wondering if this is possible. I tried to install moin moin on a separate Ubuntu 12.04 droplet first using this documentation, however, did not have much luck.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
6 answers

If you explain the issues you ran into, we’d probably be better able to help you. Installing MoinMoin on a Ghost droplet will be largely the same process as the normal installation on Nginx. The difference will be in how you setup your server blocks. The Ghost droplet is configured like:

# cat /etc/nginx/conf.d/default.conf 

[... snip ...]

server {                                                                         
    listen 80;                                                             
    server_name my-ghost-blog.com ;                                      

    client_max_body_size 10M;

    location / {                                                             
            proxy_pass http://localhost:2368/;                               
            proxy_set_header Host $host;                                     
            proxy_buffering off;                                             
    }                                                                        
}

If you have different domain names (or sub-domains) set up for the blog and the wiki, you’d need to add something like:

server {
    server_name wiki.example.com;

    location / {
        include uwsgi_params;
        uwsgi_pass unix:///srv/www/moin/moin.sock;
        uwsgi_modifier1 30;
    }
}

If want to host the wiki in a sub-folder, then instead of adding a new server block modify the existing Ghost one:

server {                                                                         
    listen 80;                                                             
    server_name my-ghost-blog.com ;                                      

    client_max_body_size 10M;

    location / {                                                             
            proxy_pass http://localhost:2368/;                               
            proxy_set_header Host $host;                                     
            proxy_buffering off;                                             
    }

     location /mywiki/ {
            include uwsgi_params;
            uwsgi_param  SCRIPT_NAME  /mywiki;
            uwsgi_pass unix:///srv/www/moin/moin.sock;
            uwsgi_modifier1 30;
     }                                                                   
}

I have the same exact config as about. I’m getting at

nginx: [emerg] “location” directive is not allowed here in /etc/nginx/conf.d/ghostblog.conf:16

while restarting nginx

fixed it.. Now when accessing /mywiki I get:

uWSGI Error
Python application not found

I’m pretty sure it might have to do with the section of wikiconfig.py

where in the instructions you have to uncomment and add

urlprefixstatic = ’/mywiki’ + urlprefixstatic

I added:

urlprefixstatic = ’/mywiki/’ + unix:///srv/www/moin/moin.sock

Started over. Followed the instructions verbatim. However the html and css are not loading correctly

http://107.170.231.56/mywiki/

figured it out was missing from conf.d default.conf

uwsgi_param  SCRIPT_NAME  /wiki;
Submit an Answer