Setup Codiad with Nginx Installation Error

December 2, 2014 1.6k views
CaePorto
By:
CaePorto

I'm trying to setup Codiad with Nginx in my Ubuntu 14.04 droplet, although I've set all permissions to Codiad files to my user, when I navigate to those files, Codiad keeps sending me "Installation Error" message, which is the following:

Installation Error

Please make sure the following exist and are writeable: 
[SYSTEM]/config.php - ERROR 
[SYSTEM]/workspace - ERROR 
[SYSTEM]/plugins - ERROR 
[SYSTEM]/themes - ERROR 
[SYSTEM]/data - ERROR

Here's my nginx configuration:

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

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

    # Make site accessible from http://localhost/
    server_name easylearnapp.me;

    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 /var/www/html;
    }

    # 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;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Also, these are the currently set permissions:

ls -l /var/www/html/Codiad/

total 124
-rwxr-xr-x  1 root root       370 Dec  2 15:04 AUTHORS.txt
-rw-r--r--  1 root root     11357 Dec  2 15:04 common.php
drwxr-xr-x 16 root root      4096 Dec  2 15:04 components
-rw-r--r--  1 root root      1127 Dec  2 15:04 composer.json
-rw-r--r--  1 root root      1612 Dec  2 15:04 config.example.php
-rw-r--r--  1 root www-data  1612 Dec  2 15:04 config.php
-rwxr-xr-x  1 root root      1489 Dec  2 15:04 CONTRIBUTING.md
drwxr-xr-x  2 root www-data  4096 Dec  2 15:04 data
-rwxr-xr-x  1 root root      1150 Dec  2 15:04 favicon.ico
-rwxr-xr-x  1 root root     17210 Dec  2 15:04 index.php
-rwxr-xr-x  1 root root       634 Dec  2 15:04 INSTALL.txt
drwxr-xr-x  2 root root      4096 Dec  2 15:04 js
drwxr-xr-x  2 root root      4096 Dec  2 15:04 languages
drwxr-xr-x  2 root root      4096 Dec  2 15:04 lib
-rwxr-xr-x  1 root root      1133 Dec  2 15:04 LICENSE.txt
drwxr-xr-x  2 root www-data  4096 Dec  2 15:04 plugins
-rwxr-xr-x  1 root root       672 Dec  2 15:04 README.md
-rwxr-xr-x  1 root root     24394 Dec  2 15:04 style_guide.php
drwxr-xr-x  3 root www-data  4096 Dec  2 15:04 themes
drwxr-xr-x  2 root www-data  4096 Dec  2 15:04 workspace

To setup php5-fpm and Nginx I've followed this tutorial: How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04
To setup Codiad I've followed this tutorial: How To Install and Configure Codiad, a Web-Based IDE, on an Ubuntu VPS

So, any suggestions?

1 Answer

I had the same trouble going through the tutorials.
Your configuration file [config.php] also needs to be executable:

-rwxr-xr-x 1 www-data www-data 1620 Dec 8 05:13 config.php

In other words chmod 755

Have another answer? Share your knowledge.