Skip to content

yobi1990/pemiluAPI

 
 

Repository files navigation

pemiluAPI

2014 Pemilu API

Installation

The steps below assume you are working on a Ubuntu machine.

Apache2 and PHP5

  1. Install Apache2

    $ sudo apt-get install -y apache2
  2. Enable mod_rewrite

    $ sudo a2enmod rewrite
    $ sudo service apache2 restart
  3. Install PHP5

    $ sudo apt-get install -y php5 libapache2-mod-php5 php5-cli php5-curl

Application

  1. Install Git

    $ sudo apt-get install -y git
  2. Clone this project

    $ git clone https://github.com/pemiluAPI/pemiluAPI.git
  3. Go to the project directory and dowload Composer

    $ cd pemiluAPI
    $ wget http://getcomposer.org/composer.phar
  4. Install the framework's dependencies

    $ php composer.phar install
  5. Set the web directory as the DocumentRoot. Modify the /etc/apache2/sites-available/default file as follow

    DocumentRoot /var/www/pemiluAPI/web
    <Directory /var/www/pemiluAPI/web>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>
    

    Please note that your modification need may vary depending on your Apache2 setup.

  6. Restart Apache2

    $ sudo service apache2 restart
  7. Open up http://127.0.0.1/status and you should see message

    {"error":{"type":"invalid_request_error"}}
    
  8. Open up http://127.0.0.1 and you should see

    {"error":{"message":"Unrecognized request URL (GET: \/).  Please see http:\/\/docs.pemiluapi.org\/.","type":"invalid_request_error"}}
    

About

2014 Pemilu API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published