Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Installation

daeks edited this page · 12 revisions

To install simply place the contents of the system in a web accessible folder.

Note: Currently the system is only tested on Apache 2+ and Nginx in a Unix filesystem. Use on a Windows server will most likely cause pathing issues.

Ensure that the following have write capabilities:

/config.php
/data
/workspace
/plugins
/themes

Navigate in your browser to the URL where the system is placed and the installer screen will appear. If any dependencies have not been met the system will alert you.

Enter the requested information to create a user account, project, and set your timezone and submit the form. If everything goes as planned you will be greeted with a login screen.

(Optional Installation Settings)

For a proper usage of the marketplace you need to set the following parameter

allow_url_fopen On

and the following extensions to be loaded

ZIP
OPENSSL

Note: Codiad will also work without these enabled.

Web server configuration examples

Apache 2

Open your configuration file, normally located at /etc/apache2/sites-available/default

<VirtualHost *:80>
        DocumentRoot /var/www
        <Directory />
                Options -Indexes FollowSymLinks MultiViews
        </Directory>

        # If you want to disable php execution in your workspace, remove the comments
        #<DirectoryMatch "^.+/workspace">
        #        AllowOverride None
        #        Options -Execcgi -Indexes -FollowSymLinks -MultiViews
        #        RemoveHandler .php .phtml .php3 .php4 .php5 .cgi .htaccess
        #        Addhandler text/plain .php .phtml .php3 .php4 .php5 .cgi .htaccess
        #        php_admin_flag engine off
        #        Deny from all
        #</DirectoryMatch>
</VirtualHost>

Finally start your apache2 server, usually with service apache2 restart

Nginx

The following nginx configuration file might not follow all the nginx best practices, but can be a good starting point to set up a Codiad instance. Copy it in /etc/nginx/site-available and symlink it from /etc/nginx/site-enabled to enable it:

cd /etc/nginx/site-enabled
ln -s /etc/nginx/site-available .

Finally restart your nginx server, usually with sudo service nginx restart.

server {
    #listen   80; ## listen for ipv4; this line is default and implied
    #listen   [::]:80 default ipv6only=on; ## listen for ipv6

    root /var/www/codiad;
    index index.php index.html;

    # Make site accessible from http://localhost/
    server_name localhost codiad.my_domain_name.org;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to index.html
        try_files $uri $uri/ /index.html;
    }

    error_page 404 /404.html;

    # redirect server error pages to the static page /50x.html
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/www;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

        # With php5-cgi alone:
        fastcgi_pass 127.0.0.1:9000;
        # With php5-fpm:
        #fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }
}
Something went wrong with that request. Please try again.