DEV Community

Arya
Arya

Posted on • Originally published at blog.n4vn33t.com on

My experience deploying ActiveCollab on AWS

What is Active Collab?

ActiveCollab on AWS

ActiveCollab is a project management software with a clean interface and is available as SaaS Cloud Hosted/Self-Hosted model.

AWS Resources used for this project were

  • EC2 — For Server and Application Hosting.
  • RDS — Managed Database.
  • ElastiCache — Caching.
  • ElasticSearch — Search and Indexing.
  • EBS — Block Storage for EC2 Instance.
  • EBS and RDS Snapshot — for easy restoration.

The experience

Active Collab is enterprise focused business app. Cloud and Self hosted model serve a purpose, Cloud is suitable for non-tech companies who don't want to focus at infrastructure, maintenance and uptime whereas Self hosted version is suitable for businesses who want full control of their Data, Hosting and Maintenance and have teams working 24*7 maintaining uptime of the application.

The application is wonderful to use once setup but I found their guides a bit lacking for AWS deployments.

We wanted to use nginx, but the documentation lacks the guide for it, here is a sample that anyone can refer.

#
# Default server configuration
#
server {
        listen 80 default_server;
        listen [::]:80 default_server;
#
# Public folder should be the document root.
#
        root /var/www/site-directory/public;

#
# Active collab setup stuff
#
        index router.php;
        access_log /var/log/nginx/activecollab-{version}-access.log;
        error_log /var/log/nginx/activecollab-{version}-error.log debug;
        server_name _;

#
# URL Rewrite
#
        location / {
            if (!-e $request_filename) {
                rewrite ^/assets/(.*)$ /assets/$1 last;
                rewrite ^/avatars/(.*)$ /avatars/$1 last;
                rewrite ^/wallpapers/(.*)$ /wallpapers/$1 last;
                rewrite ^/verify-existence$ /verify.php last;
                rewrite ^/proxy.php$ /proxy.php last;
                rewrite ^/api/v([0-9]*)/(.*)$ /api.php?path_info=$2&api_version=$1 last;
                rewrite ^$ /router.php last;
                rewrite ^(.*) /router.php?path_info=$1 last;
            }
        }

#
# PHP FPM Backend
#
        location ~ \.php$ {
            fastcgi_pass unix:/run/php/php{version}-fpm.sock;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param SCRIPT_NAME $fastcgi_script_name;

            if (!-e $request_filename) {
                rewrite ^(.*) /router.php?path_info=$1 last;
            }
        }

}

Enter fullscreen mode Exit fullscreen mode

Setup instructions for ElasticSearch on AWS is not documented.

How to setup Elasticsearch?

You need to spin up ES instance on AWS and connect all the different services in a VPC lock them down using Security groups.

Once you set up the VPC(Kinda like VLAN) and SecurityGroups(Firewall) correctly all the services will be accessible internally in AWS network and then you can open access to the VPS serving Active Collab.

Overall experience was good and you can scale the app easily by resizing EC2, EBS and add load balancing.

Oldest comments (2)

Collapse
 
michael_dsg profile image
Michael Montera

Hi Arya,

Just read your post regarding Active Collab. Have you encountered this issue? it something to do with the php version running the script. The server is already running PHP 8.0 and had this error. See attached file please.

Have a nice day!
Image description

Collapse
 
iamarya profile image
Arya

Hey Michael,

Excuse late reply, I haven't been active here for a while. Our Activecollab instance has been working without hiccups for a while now. No we didn't encounter that error.