Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Configuring the Ryzom API

Info

You will need to configure the Ryzom API before you configure the Ryzom App, as the App is dependent upon the API.

Configuring the Web Server

First you will need to create a new virtual host for the web server. It is important to note that the Ryzom API and App make the assumption that you will have a fully qualified sub-domain associated with each of them. It is not tested on a local installation at this point.

...

Panel
titleExample Ryzom API Site
borderStyledashed
######################
# Ryzom API Site #
######################
<VirtualHost *:80>
<Directory "/home/username/ryzom/code/web/">
Options -Indexes FollowSymLinks MultiViews
IndexOptions FancyIndexing FoldersFirst NameWidth=*
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin admin@localhost
 
DocumentRoot ServerAdmin admin@localhost  DocumentRoot /home/username/ryzom/code/web/api ServerName api.domain.org
</VirtualHost>

Configuring the API

Next you will need to copy the default configuration files for use:

Code Block
languagebash
cd $RYZOM_PATH/../web/api
cp ./server/config.php.default ./server/config.php
cp ./client/config.php.default ./client/config.php
cp ./common/config.php.default ./common/config.php 

Modify the Server Config

You will need to modify the following variables in the server/config.php file:

  • RYAPI_SHARDID - this should be set to your shard ID - the default is 301.
  • RYAPI_NELDB_PASS - set this to blank if you're using the default shard privilege script.
  • RYZOM_WEBDB_LOGIN - set this to webdb to webdb or if you're an advanced user set it to a user of your choice.
  • RYZOM_WEBDB_PASS - set this to blank or if you're an advanced user set it to a password of your choice.

You will need to modify the following code in the commonthe common/config.php file so that the URL matches where your API and App will be hosted:

Code Block
languagephp
# Make sure you change this from client to server
define('RYAPI_MODE', 'server');
 
// Url where the api is
define('RYAPI_URL', 'http://api.domain.org/');
/* ... skip some code ... */
// used by "home" link
if (!defined('RYAPP_URL'))
        define('RYAPP_URL', 'http://app.domain.org/');
Info

We still need documentation regarding:

  • RYAPI_COOKIE_KEY
  • RYAPI_EGS_SALT

 

Configuring the Ryzom App

Configuring the Web Server

First you will need to create a new virtual host for the web server. It is important to note that the Ryzom API and App make the assumption that you will have a fully qualified sub-domain associated with each of them. It is not tested on a local installation at this point.

First create your new vitrual host configuration in Apache.

 

Panel
titleExample Ryzom API Site
borderStyledashed
######################
# Ryzom App Site #
######################
<VirtualHost ####################### Ryzom App Site #######################<VirtualHost *:80>
<Directory "/home/username/ryzom/code/web/">
Options -Indexes FollowSymLinks MultiViews
IndexOptions FancyIndexing FoldersFirst NameWidth=*
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin admin@localhost
 
DocumentRoot ServerAdmin admin@localhost  DocumentRoot /home/username/ryzom/code/web/app    # The client hardcodes /start/ for WebIG sessions:  Alias /start/ /home/username/ryzom/code/web/app app   ServerName app.domain.org
<org</VirtualHost>

Configuring the App

Next you will need to copy the default configuration file for use:

Code Block
languagebash
cd $RYZOM_PATH/../web/app
cp ./config.php.default ./config.php 

Once copied you will want to edit it and define the RYAPP_URL variable.

Code Block
languagephp
define('RYAPP_URL', 'http://app.domain.org/'); 

 

Build the Database

You will need to execute two scripts to build the basic API database and the test application database. 

Code Block
mysql -u root -p < $RYZOM_PATH/../web/create_webig.sql
mysql -u root -p < $RYZOM_PATH/../web/app/app_test/create.sql 

Next execute the following to grant the webdb the webdb user access, using the values you set earlier in the setup. First open MySQL up and then execute the following:

GRANT ALL ON webig.* TO webdb@localhost; GRANT ALL ON app_test.* TO webdb@localhost;
Code Block
 

Configuring the Client

You will need to add or modify the following configuration variables to match your shard's virtual hosts:

 
Panel
WebIgMainDomain = "app.domain.org";
// These are the domains which the client is allowed to execute Lua code from.
WebIgTrustedDomains = { "shard.domain.org", "app.domain.org", "api.domain.org" }
 

Troubleshooting

Table players not found

...