// -----------------------------------------------------------------------
// This file is part of AROUNDMe
// 
// Copyright (C) 2003-2007 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; see the file COPYING.txt.  If not, see
// <http://www.gnu.org/licenses/>
// -----------------------------------------------------------------------


>> AROUNDMe collaboration server (AMc) installation guide
   AMc can be used to create one or many Internet based interest
   groups which we term 'webspaces'.


>> WHO SHOULD INSTALL
   An understanding of domain name setup, FTP, changing directory
   privileges and web servers is required.


>> Installation
   I want to install a single webspace (see Appendix A)
   I want to install for multiple webspaces (see Appendix B)
   I want to install on localhost for testing (see Appendix C)


>> Appendix A – installation for a single webspace

   1. Copy up ALL the files from the build. This should look like:
      /<path>/aroundme_c<build_date>/aroundme_c/ This is known as
      "the directory".

   2. You can create a subdomain like http://gardening.your_domain.org
      or use your main site such as http://www.your_domain.org for your
      installation. Point your domain to the directory.

   3. Create a file in the directory called '.htaccess'. Copy the texts
      below into it and save.

      #start of copy into .htaccess for gardening subdomain ................
      RewriteEngine On
      RewriteCond %{HTTP_HOST} !^gardening\.your_domain\.org [NC]
      RewriteRule ^(.*)$ http://gardening.your_domain.org/$1 [R=301,L]
      #end of copy into .htaccess ................

      #start of copy into .htaccess for main www domain ................
      RewriteEngine On
      RewriteCond %{HTTP_HOST} !^www\.your_domain\.org [NC]
      RewriteRule ^(.*)$ http://www.your_domain.org/$1 [R=301,L]
      #end of copy into .htaccess ................

   4. Type your domain / subdomain into a browser and add "/maintain.php".
      The installer will start. Follow the instructions there.

   5. Your installation is complete. From the maintain screen you can now
      create a webspace. Be use to name your webspace gardening/www when
      prompted for a name.


>> Appendix B – installation for a multiple webspaces

   AMc can be configured so that only you; the maintainer can create a
   webspace or so that anyone can create a webspace. If AMc is set for
   anyone to create a webspace then you can have this happen automatically
   or as an application process from which you approve webspace application
   requests.

   Each webspace has a name which matches the subdomain; plumbing would be
   http://plumbing.your_domain.org .

   If you setup so that only you can create a webspace in you can manually
   setup a subdomain each time you create a webspace. If you want anyone to
   create a webspace then they will choose the subdomain name hence you will
   need to setup wildcard domains. To do this you must have wildcard domain
   names pointing to your server. You can test this by typing the following
   domains into your browser:

      http://www.your_domain.org
      http://foo.your_domain.org
      http://your_domain.org

   All of these should go to your webserver. If they do, then you are ready
   to continue to install AMc. If not contact your domain name maintainer
   and request that all sub domains be pointed to your webserver.

   1. Copy up ALL the files from the build. This should look like:
      /<path>/aroundme_c<build_date>/aroundme_c/ This is known as
      "the directory".

   2. Type your master domain / subdomain into a browser (normally
      http://your_domain.org or http://www.your_domain.org) and add
      "/maintain.php". The installer will start. Follow the instructions
      there.

   3. Your installation is complete. From the maintain screen you can now
      create a webspace. If you have allowed for anyone to create a webspace
      then a "create" button will appear on the webpage displayed under your
      master domain.


>> Appendix C – localhost installation for testing
   1. Copy up ALL the files from the build. This should look like:
      /<path>/aroundme_c<build_date>/aroundme_c/ This is known as
      "the directory".

      If you are installing on a localhost then there is a good chance
      that you are a different user that your web server. You therefore
      need to alter the owner of the AMc files and modify their permissions.

      Establish the owner name of your web server (in this example we use
      Apache). Type 'ps aux' into your command line and look for processes
      with the name 'apache'. You will see the owner; in this case 'www-data':

      Change the owner recursively ( -R) to 'www-data' on the AMc directory.

      chown -R www-data /<path>/aroundme_c<build_date>/

      You may need to be connected as root to do this. If the operating
      system reports that you do not have permissions then repeat the
      equivalent command as root (example for Ubuntu):

      sudo chown -R www-data /<path>/aroundme_c<build_date>/

      Next modify the permissions:

      chmod -R 770 /<path>/aroundme_c<build_date>/

   2. The following uses the example webspace name of 'gardening'. The
      following assumes you have access to edit your Apache vhosts file
      which is typically held in /etc/apache2/sites-enabled/ (backup
      then edit 000-default). Then add the texts below. Once complete
      restart Apache.

      <VirtualHost *:80>
         ServerName gardening.localhost
         DocumentRoot /home/www/aroundme_c/aroundme_c
         DirectoryIndex index.php index.html index.html index.htm index.shtml
      </VirtualHost>

      You can create multiple vhost entries to test for multiple webspaces.

   3. Type your domain / subdomain into a browser and add
      "/maintain.php". The installer will start. Follow the instructions
      there.

   4. Your installation is complete. From the maintain screen you can now
      create a webspace whos name matches an entry in your vhosts file. If
      you have allowed for anyone to create a webspace then a "create"
      button will appear on the webpage displayed under your master domain
      To see this type http://<webspace_name>.locahost/index.php?t=overview

// END OF DOCUMENT -------------------------------------------------------------------