June 3, 2016

How to install Lighttpd and Codiad

With this guide you can install a full webserver in your NVIDIA Jetson TK1, and with Codiad you can edit all webpages in your web page.

Lighttpd and PHP5

In this first step you can install lighttpd server and php5

sudo apt-get install lighttpd
sudo apt-get install php5-cgi php5

SET PERMISSION 

In this step you make /var/www writable without sudo privileges for your account [1]

  • Add user to www-data group
  • Add /var/www to www-data (recursive)
  • Change file and folder permissions on /var/www (recursive)

sudo adduser username www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www

finally Log out and log in.

SOLVE PHP error

Now if you receive error “HTTP 403 – Forbidden” to read with your browser all file in folders you must enable the fast cgi [2]:

sudo lighty-enable-mod fastcgi
sudo lighty-enable-mod fastcgi-php
sudo service lighttpd force-reload

Install Codiad

Finally we can install Codiad in ours www server, we make a clone of Codiad git repository in /var/www directory:

cd /var/www
git clone git://github.com/Codiad/Codiad

Make the Codiad directory writable:

sudo chown -Rf www-data:www-data Codiad

Rename the file config.example.php in config.php:

mv config.example.php config.php

 

Finally we go in:

http://tegra-ubuntu.local/Codiad

(Or correct hostname)

Codiad install page

Codiad install page

Finally you can complete the installation and you can use for your web applications

Reference

[1] http://bjarneo.codes/ubuntu-add-permissions-to-user-for-www-data/
[2] http://el.web.id/how-to-solve-lighttpd-php-403-forbidden-in-ubuntu-196

Copyright © 2016. All Rights Reserved.