Report this

What is the reason for this report?

Ghost, Moin Moin and Nginx

Posted on July 27, 2014

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.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.