Community
Discussions | Feature Requests | Tips and Tricks
Sample demo PHP and Javascript code of creating your own Web Interface
#1Feb. 6, 2012 17:02:44
- Jeremy Bar
- Registered: 2011-01-05
- Posts: 30
Sample demo PHP and Javascript code of creating your own Web Interface
The attached api-demo_v3.tar.gz tar file contains a small PHP / Javascript application that demonstrate how to connect to the Nimbula Director API from PHP.
You can follow those instructions to install this web application on an Ubuntu 10.04 server:
You can follow those instructions to install this web application on an Ubuntu 10.04 server:
- Starting from an Ubuntu Lucid 10.04 system, install the following packages: (Might be similar for other Debian based distributions) sudo aptitude install php5-cgi php5-curl nginx
- Extract attached archive in the root folder, all paths are absolute to / cd / && sudo tar -zxf api-demo_v3.tar.gz
- Set up Nginx sudo rm /etc/nginx/sites-enabled/default
- Add the following line to /etc/rc.local /etc/init.d/php-fastcgi start
- Edit /var/www/api-demo.php and change the $api variable to point to the Nimbula Director API of your cluster.
- Point your browser at the IP address of the server running the web API.
sudo ln -s /etc/nginx/sites-available/demo /etc/nginx/sites-enabled/demo
sudo service nginx restart
and run:
sudo /etc/init.d/php-fastcgi start
Edited jeremy (Feb. 6, 2012 17:03:40)
Attachments:
api-demo_v3.tar.gz (32.0 KB)