Running ActiveCollab 3 On Nginx (LEMP) On Debian Wheezy/Ubuntu 12.10

Running ActiveCollab 3 On Nginx (LEMP) On Debian Wheezy/Ubuntu 12.10


Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 04/10/2013


This tutorial shows how you can install and run activeCollab 3 on a Debian Wheezy or Ubuntu 12.10 system that has nginx installed instead of Apache (LEMP = Linux + nginx (pronounced “engine x”) + MySQL + PHP). nginx is a HTTP server that uses much less resources than Apache and delivers pages a lot of faster, especially static files.


I do not issue any guarantee that this will work for you!


1 Preliminary Note


I want to install activeCollab in a vhost called www.example.com/example.com here with the document root /var/www/www.example.com/web.


You should have a working LEMP installation, as shown in this tutorial:


A note for Ubuntu users:


Because we must run all the steps from this tutorial with root privileges, we can either prepend all commands in this tutorial with the string sudo, or we become root right now by typing


sudo su


2 Installing APC


APC is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It’s similar to other PHP opcode cachers, such as eAccelerator and XCache. It is strongly recommended to have one of these installed to speed up your PHP page.


APC can be installed as follows:


apt-get install php-apc


Reload PHP-FPM as follows:


/etc/init.d/php5-fpm reload


3 Installing activeCollab


The document root of my www.example.com web site is /var/www/www.example.com/web – if it doesn’t exist, create it as follows:


mkdir -p /var/www/www.example.com/web


Next download activeCollab from the activeCollab web site (you need to buy a license – it’s not freeware) to your local computer; from there, upload it to your server (e.g. the /tmp directory), unzip it and place it in your document root:


cd /tmp
unzip activecollab-corporate-3.2.12.zip
cd for-upload/
mv * /var/www/www.example.com/web/


It is recommended to make the document root and the activeCollab files in it writable by the nginx daemon which is running as user www-data and group www-data:


chown -R www-data:www-data /var/www/www.example.com/web


If you haven’t already created a MySQL database for activeCollab (including a MySQL activeCollab user), you can do that as follows (I name the database activecollab in this example, and the user is called ac_admin, and his password is ac_admin_password):


mysqladmin -u root -p create activecollab


mysql -u root -p


GRANT ALL PRIVILEGES ON activecollab.* TO ‘ac_admin’@'localhost’ IDENTIFIED BY ‘ac_admin_password’;
GRANT ALL PRIVILEGES ON activecollab.* TO ‘ac_admin’@'localhost.localdomain’ IDENTIFIED BY ‘ac_admin_password’;


FLUSH PRIVILEGES;


quit;


Next we create an nginx vhost configuration for our www.example.com vhost in the /etc/nginx/sites-available/ directory as follows:


vi /etc/nginx/sites-available/www.example.com.vhost




server {
listen 80;
server_name www.example.com example.com;
root /var/www/www.example.com/web;

if ($ http_host != "www.example.com") {
rewrite ^ http://www.example.com$ request_uri permanent;
}

index index.php index.html;

location = /favicon.ico {
log_not_found off;
access_log off;
}

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}

location / {
try_files $ uri $ uri/ /index.php?path_info=$ uri&$ args;
access_log off;
expires max;
}

location ~ \.php$ {
try_files $ uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $ document_root$ fastcgi_script_name;
fastcgi_intercept_errors on;
}
}

To enable the vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:


cd /etc/nginx/sites-enabled/
ln -s /etc/nginx/sites-available/www.example.com.vhost www.example.com.vhost


Reload nginx for the changes to take effect:


/etc/init.d/nginx reload


Now we can launch the web-based activeCollab installer by going to http://www.example.com – click on the Validate button to have the installer check if the system requirements are fulfilled:




If the system requirements are fulfilled, you can now fill in your database details and click on Connect:




Next, specify an email address and password for the administrator account, accept the license agreement and click on Install:




That’s it – click on the Log in Now! button or go to http://www.example.com/public/index.php




… to log into activeCollab:




This is how the activeCollab interface looks:




4 Links


About The Author


Falko Timme is the owner of nginx WebhostingTimme Hosting (ultra-fast nginx web hosting). He is the lead maintainer of HowtoForge (since 2005) and one of the core developers of ISPConfig (since 2000). He has also contributed to the O’Reilly book “Linux System Administration”.



Running ActiveCollab 3 On Nginx (LEMP) On Debian Wheezy/Ubuntu 12.10



Running ActiveCollab 3 On Nginx (LEMP) On Debian Wheezy/Ubuntu 12.10
Terima kasih telah membaca artikel tentang Running ActiveCollab 3 On Nginx (LEMP) On Debian Wheezy/Ubuntu 12.10 di blog Tutorial Opensource and Linux jika anda ingin menyebar luaskan artikel ini di mohon untuk mencantumkan link sebagai Sumbernya, dan bila artikel ini bermanfaat silakan bookmark halaman ini di web browser anda, dengan cara menekan Ctrl + D pada tombol keyboard anda.

Artikel terbaru :