Changes between Version 4 and Version 5 of how-to/servers/support/gnusocial


Ignore:
Timestamp:
Aug 18, 2014, 1:38:03 PM (5 years ago)
Author:
Mats Sjöberg
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • how-to/servers/support/gnusocial

    v4 v5  
    11= Setting up Meteor real-time updates
    22
    3 In order to have real-time updates in the web interface of GNU Social one needs to enable the Meteor plugin (part of GNU Social) and set up a Meteor server. The Meteor server can be downloaded from http://meteorserver.org/#download - I used the latest stable source package. Unpack the source code in some suitable directory, then copy the sample config to its place:
     3In order to have real-time updates in the web interface of GNU Social one needs to enable the Meteor plugin (part of GNU Social) and set up a Meteor server. We want to server Meteor over https, and opt to use Apache for proxying the URLs for this.
     4
     5
     6The Meteor server can be downloaded from http://meteorserver.org/#download - I used the latest stable source package. Unpack the source code in some suitable directory, then copy the sample config to its place:
    47
    58{{{
     
    710}}}
    811
    9 At the beginning of this file you need to add these configuration options:
     12At the beginning of this file you need to add these configuration options. It means that the Meteor server will be listening to localhost for both controller (sending messages) and subscriber (client waiting for messages). The subscriber is the web browser, but this will be proxied via apache, which is why we can bind to localhost.
    1013
    1114{{{
     
    1821
    1922Set the `SubscriberDocumentRoot` to where you unpacked the meteor source and append `/public_html/`.  If you are serving over https (which you should) you need to edit `public_html/meteor.js` and change the `scheme:` setting from `http` to `https`.
     23
     24Next set up Apache proxying in the place for your GNU Social virtual host:
     25
     26{{{
     27  # Proxy for Meteor server
     28  <IfModule mod_proxy.c>
     29    ProxyPass /poll.html http://127.0.0.1:8085/poll.html
     30    ProxyPassReverse /poll.html http://127.0.0.1:8085/poll.html
     31    ProxyPass /stream.html http://127.0.0.1:8085/stream.html
     32    ProxyPassReverse /stream.html http://127.0.0.1:8085/stream.html
     33    ProxyPass /meteor.js http://127.0.0.1:8085/meteor.js
     34    ProxyPassReverse /meteor.js http://127.0.0.1:8085/meteor.js
     35    ProxyPass /push/ http://127.0.0.1:8085/push/
     36    ProxyPassReverse /push/ http://127.0.0.1:8085/push/
     37  </IfModule>
     38}}}
     39
     40You also need to add the proper modules to apache and restart:
     41
     42{{{
     43a2enmod proxy
     44a2enmod proxy_http
     45service apache2 restart
     46}}}
     47
     48Finally enable the plugins in the GNU Social `config.php` file:
     49
     50{{{
     51addPlugin('Realtime');
     52addPlugin('Meteor', array('webserver' => 'your.gnu-social.site.com',
     53    'webport' => '443',
     54    'controlserver' => '127.0.0.1',
     55    'controlport' => '4671',
     56    'protocol' => 'https'
     57    ));
     58}}}
    2059
    2160= Adding MF/PL statement check box