[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howtos:network_services:weave [2012/09/26 00:56 (UTC)] – moved from the general howtos namespace mfillpothowtos:network_services:weave [2013/07/09 21:07 (UTC)] (current) – Cosmetic update to use the same example pathname all across the board alienbob
Line 17: Line 17:
      * sqlite3 (already supplied by Slackware as well)      * sqlite3 (already supplied by Slackware as well)
      * [[http://www.virtualenv.org/|virtualenv]]. Slackware packages can be downloaded here: [[http://slackware.com/~alien/slackbuilds/virtualenv/|http://slackware.com/~alien/slackbuilds/virtualenv/]] or built using the [[http://slackbuilds.org/python/virtualenv/|SlackBuilds.org script]] .      * [[http://www.virtualenv.org/|virtualenv]]. Slackware packages can be downloaded here: [[http://slackware.com/~alien/slackbuilds/virtualenv/|http://slackware.com/~alien/slackbuilds/virtualenv/]] or built using the [[http://slackbuilds.org/python/virtualenv/|SlackBuilds.org script]] .
- 
-Installing a virtualenv package is not really needed since it will be downloaded automatically during the “''make build''” command which you will run as part of the next step in the procedure. 
  
 The Sync Server code is hosted in a Mercurial repository and since Slackware ships a Mercurial client, that code is easy to check out to a local directory where you continue to build the server binary: <code> The Sync Server code is hosted in a Mercurial repository and since Slackware ships a Mercurial client, that code is easy to check out to a local directory where you continue to build the server binary: <code>
Line 28: Line 26:
  
   * By default, the server stores your sync data in a sqlite database (you can use a real MySQL server database if you want), but it will create the sqlite database in ''/tmp'' which is entirely inappropriate. Further down you will find what you have to modify so that your clients’ sync data go somewhere less “volatile”.   * By default, the server stores your sync data in a sqlite database (you can use a real MySQL server database if you want), but it will create the sqlite database in ''/tmp'' which is entirely inappropriate. Further down you will find what you have to modify so that your clients’ sync data go somewhere less “volatile”.
-  * The python-based Sync Server can run all by itself on a configurable port number (5000 by default) which is just fine if you are its only user in your little LAN. But even Mozilla advises to put a real webserver between you and the Sync Server. In Slackware you can use the apache webserver for this. You must install an additional apache module for this to work: [[http://code.google.com/p/modwsgi/|mod_wsgi]]. Slackware packages can be downloaded here: [[http://slackware.com/~alien/slackbuilds/mod_wsgi/|http://slackware.com/~alien/slackbuilds/mod_wsgi/]] .+  * The python-based Sync Server can run all by itself on a configurable port number (5000 by default) which is just fine if you are its only user in your little LAN. But even Mozilla advises to put a real webserver between you and the Sync Server. In Slackware you can use the apache webserver for this. You must install an additional apache module for this to work: [[http://code.google.com/p/modwsgi/|mod_wsgi]]. Slackware packages plus SlackBuild script can be downloaded here: [[http://slackware.com/~alien/slackbuilds/mod_wsgi/|http://slackware.com/~alien/slackbuilds/mod_wsgi/]] or get a alternative SlackBuild script from [[http://slackbuilds.org/result/?search=mod_wsgi|slackbuilds.org]].
  
 ===== Configuration ===== ===== Configuration =====
Line 57: Line 55:
       ErrorLog  /var/log/httpd/sync.myserver.net-error.log       ErrorLog  /var/log/httpd/sync.myserver.net-error.log
     </VirtualHost>     </VirtualHost>
-</code> This tells apache that a script called “sync.wsgi” is going to be spawned as user “weave:sync” whenever a client connects to %%http://sync.myserver.net/%% .+</code> Apache 2.4 uses a different syntax for access control: <code> 
 +    <Directory /usr/local/server-full> 
 +      Require all granted 
 +    </Directory> 
 +     
 +    <VirtualHost *:80> 
 +      ServerName sync.myserver.net 
 +      DocumentRoot /usr/local/server-full 
 +      WSGIProcessGroup sync 
 +      WSGIDaemonProcess sync user=weave group=sync processes=2 threads=25 
 +      WSGIPassAuthorization On 
 +      WSGIScriptAlias / /usr/local/server-full/sync.wsgi 
 +      CustomLog /var/log/httpd/sync.myserver.net-access.log combined 
 +      ErrorLog  /var/log/httpd/sync.myserver.net-error.log 
 +    </VirtualHost> </code> This tells apache that a script called “sync.wsgi” is going to be spawned as user “weave:sync” whenever a client connects to %%http://sync.myserver.net/%% . 
  
   * Modify your apache server's main configuration file "''/etc/httpd/httpd.conf''", in order to make it load the mod_wsgi module and use its configuration file. Add the following lines to the ''httpd.conf'': <code>   * Modify your apache server's main configuration file "''/etc/httpd/httpd.conf''", in order to make it load the mod_wsgi module and use its configuration file. Add the following lines to the ''httpd.conf'': <code>
 howtos:network_services:weave ()