0 of 1 found this page helpful

Running MindTouch in a subdirectory

    The problem

    When you go to http://server.example.org/, you see MindTouch immediately.  Worse, if you install an application like phpMyAdmin, and browse to http://server.example.org/phpMyAdmin, you see a blank MindTouch page named 'phpMyAdmin' rather than the application.

    You would like to set your server up so that you go to http://server.example.org/mindtouch/, and can go to http://server.example.org/otherapp to see the other application.

    Short answer: Sorry, you can't.

    (What a horribly dismissive answer!)

    Long answer: That isn't The Right Way.  But this is!

    MindTouch isn't designed to run in a subdirectory.  It's designed to run as its own virtual host, or subdomain. 

    Setting up your own subdomain

    Imagine you have a setup like this:

    Hosts file:

    10.7.0.153    server.example.org
    

    DNS:

    server.example.org.        86400   IN      A       10.7.0.153

    What you need to do is add another entry, something like this.

    Hosts file:

    10.7.0.153    server.example.org mindtouch.example.org
    

    DNS:

    server.example.org.         IN      A       10.7.0.153
    mindtouch.example.org.      IN      PTR     server.example.org.
    

    In reality, you will probably say "Network Administrator or Hosting Control Panel, please create a 'mindtouch.example.org' alias for me".

    Now, you have two names both pointing to the same IP address.

    Setting up Apache for Virtual Hosting

    The magic here is that web servers can serve different requests based on what host name you are requesting - even if they are on the same IP. 

    Changing the ServerName of the MindTouch virtual host

    The Apache control file for MindTouch on the VM is /etc/apache2/sites-available/dekiwiki.  This section the virtual host starts like so:

    <VirtualHost *>
        ServerName dekwiki
    

    On the VM, this is the only virtual host that is enabled, so it will serve results for all names. If you want to host something else on the same machine, this probably isn't what you want.  You want MindTouch to only answer to requests on deki.example.org

    Let's set that up.  Change the ServerName like so:

    ServerName deki.example.org
    

    This means that this virtual host block will now only listen to requests for mindtouch.xample.org

    Setting up another virtual host

    If you enable the default site:

    dekiwiki:/etc/apache2/sites-available# a2ensite default
    Site default installed; run /etc/init.d/apache2 reload to enable.
    dekiwiki:/etc/apache2/sites-available# /etc/init.d/apache2 reload
     * Reloading web server config...                                                                                      
                                                                                                                     [ ok ]
    

    and go to http://server.example.org/, you will be redirected to http://server.example.org/apache2-default/and see "It works!", (the entire contents of the default Apache web site on Debian).  You now have to go to http://mindtouch.example.org/ to see the wiki.  You can configure server.example.org how you please - and create any other virtual hosts you want.

    Longer answer: you could, but you shouldn't.

    There are parts in MindTouch where it is hard coded to believe it is at the root of its subdomain (i.e. at /, not at /dekiwiki/).  There has been an offer to fix this, but as of this writing, no patch has been submitted.  If you're interested in helping out, please drop by the thread and offer your assistance!

    (It should be noted at this point that solely based on length of text, the long answer is substantially longer than the longer answer.)

    Was this page helpful?
    Tag page
    Viewing 3 of 3 comments: view all
    This is a major limitation... Please fix this
    Posted 03:48, 15 Nov 2010
    The problem is that servers running ssl can't use named virtualhosts on apache, so running this from a subdomain is impossible without creating another server using ssl. Another solution if you need to run it on a seperate port, which can work if you need to run it on the same server. We use port 8443 to run a mindtouch wiki along with a main site on port 443. At the moment I think this is the only way of running mindtouch over ssl when needing to also run other sites on the same server
    Posted 08:06, 8 Apr 2011
    @mwc surfacing MindTouch as a subdomain is definitely supported. This article more deals with the inability to install in a subdirectory i.e. /var/www/somesite/mindtouch where you could then go to www.somesite.com/mindtouch That isn't supported. Hope this helps clarify
    Posted 08:15, 8 Apr 2011
    Viewing 3 of 3 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by