Unify domain names in README
[stouyapi.git] / README.rst
index 785269d18658b1c8201b5aefaf4ca727860fc9f4..dae49f3515b2db574afa051c128e0f955718dfd7 100644 (file)
@@ -16,8 +16,8 @@ OUYA config change
 - Create file ``ouya_config.properties``
 - Add::
 
-    OUYA_SERVER_URL=http://stouyapi.boo
-    OUYA_STATUS_SERVER_URL=http://stouyapi.boo/api/v1/status
+    OUYA_SERVER_URL=http://stouyapi.example.org
+    OUYA_STATUS_SERVER_URL=http://stouyapi.example.org/api/v1/status
 
 The changes should take effect immediately.
 If they do not, reboot the OUYA once.
@@ -35,16 +35,60 @@ The username will appear on your ouya main screen.
 
 Apache setup
 ============
+
+.. note:: Step-by-step setup instructions can be found in
+          `HOWTO-SETUP.rst <HOWTO-SETUP.rst>`__.
+
+
 Virtual host configuration::
 
-  Script PUT /empty-json.php
-  Script DELETE /api/v1/queued_downloads_delete.php
+  <VirtualHost *:80>
+    ServerName stouyapi.example.org
+    DocumentRoot /path/to/stouyapi/www
+
+    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>
 
-``mod_actions`` and ``mod_expires`` need to be enabled for apache 2.4.
+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.example.org/api/firmware_builds
+   HTTP/1.1 200 OK
+   [...]
+
+   # check if rewritten API routes work
+   $ curl -I http://stouyapi.example.org/api/v1/discover/discover
+   HTTP/1.1 200 OK
+   [...]
+
+   # check if PHP routes work
+   curl -I http://stouyapi.example.org/api/v1/gamers/me
+   HTTP/1.1 200 OK
+   [...]
+
+
 Building API data
 =================
 Download the OUYA game data repository from