Installation on server

Receive data

  • Create an ssh user “deployment” to receive data
  • Create a package directory - it can be outside webroot eg. /var/www/ with write permissions for user “deployment” and read persmissions for webserver.
mkdir /var/www/
chown deployment:www-data /var/www/
chmod 750 /var/www/
  • Configue the ci sever to rsync with ssh user “deployment” here

Xsentfile module

On Apache Webserver install xsendfile module.

i.e. on CentOS

yum install mod_xsendfile

Configuration of vhost

In the Apache vhost for cipkg server set the XSendFilePath - it is an absolute path on your websever.

Redirect all requests to /packages/[whatever] to /packages/index.php

Example snippet

    XSendFile On
    XSendFilePath "/var/www/"

    <Location "/packages">

        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php [QSA,L]