============
Virtual host configuration::
- Script PUT /empty-json.php
- Script DELETE /api/v1/queued_downloads_delete.php
+ <VirtualHost *:80>
+ ServerName stouyapi.test
+ DocumentRoot /path/to/stouyapi/www
-``mod_actions`` and ``mod_expires`` need to be enabled for apache 2.4.
+ CustomLog /var/log/apache2/stouyapi-access.log combined
+ ErrorLog /var/log/apache2/stouyapi-error.log
+
+ Script PUT /empty-json.php
+ Script DELETE /api/v1/queued_downloads_delete.php
+
+ <Directory "/path/to/stouyapi/www">
+ AllowOverride All
+ Require all granted
+ </Directory>
+ </VirtualHost>
+
+The following modules need to be enabled in Apache 2.4
+(with e.g. ``a2enmod``):
+
+- ``actions``
+- ``expires``
+- ``php`` (or php-fpm via fastcgi)
+- ``rewrite``
The virtual host's document root needs to point to the ``www`` folder.
+Test your Apache setup
+----------------------
+::
+
+ # check if normal API routes work
+ $ curl -I http://stouyapi.cwboo/api/firmware_builds
+ HTTP/1.1 200 OK
+ [...]
+
+ # check if rewritten API routes work
+ $ curl -I http://stouyapi.cwboo/api/v1/discover/discover
+ HTTP/1.1 200 OK
+ [...]
+
+ # check if PHP routes work
+ curl -I http://stouyapi.cwboo/api/v1/gamers/me
+ HTTP/1.1 200 OK
+ [...]
+
+
Building API data
=================
Download the OUYA game data repository from