Backend Services

Web Server

The pages generated by Cortex are powered by version 2.0.53 of the Apache web server. The server is located in the httpd directory in your Cortex installation. It is configured to listen on port 8365/TCP for non SSL traffic and 8366/TCP for SSL traffic. The web server is configured by a standard httpd.conf configuration file that you may edit at your leisure, but we recommend against it as this may break your Cortex installation. The server has been configured to use a minimum amount of Apache modules to ease RAM usage.

Cortex's web server keeps access and error logs in the httpd/logs directory relative to your Cortex installation. These logs can be extremely useful in diagnosing problems you encounter while using Cortex.

 

A note on PHP

Cortex itself is written in PHP 4.3.7. Version 2.5.5 of the Zend Optimizer is bundled along with it to speed up page generation, and the Zend Encoder is protecting the code. More on code encryption is exlained in the security section of this manual.

 

Database Server

Cortex employs use of a bundled mySQL 4.0.20 server to save its data and game configs to. The server is configured to listen on port TCP/3365, but is otherwise uses a default server configuration.

All data to and from the mySQL server is done by the "i365" mySQL user. A root user exists for this server, but it's password is randomly generated when Cortex is installed and is inaccessable for end user use. The i365 user's credentials are kept in the Cortex database configuration file, located at etc/dbconfig.xml in your Cortex installation directory. The i365 user's password is randomly generated when Cortex is installed. Here is a sample dbconfig.xml file:

<?xml version="1.0" encoding="utf-8" ?>
<config>
<mysql>
<server>localhost</server>
<db>i365</db>
<user>i365</user>
<pass>a4brt2ds</pass>
<port>3365</port>
</mysql>
<i365>
<updateServer>update.insomnia365.com</updateServer>
</i365>
</config>

We highly recommend against editing this file. If Cortex is unable to login to its database server it will display the error "Unable to contact database" in your web browser. If you wish to test connectivity to the database a mySQL client exists at mysql/bin/mysql(.exe). Use your dbconfig.xml file' s login credentials to connect and use the quit command to log out, for example:

[user@myserver i365]$ mysql/bin/mysql --user=i365 --pass=a4brt2ds --port=3365 i365
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 773 to server version: 4.0.20

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye

Once logged in you can use any of the standard mySQL commands and queries on the database. Some of our customers have helped our development team out by pointing out potential improvements in database structure and usage. You are more than welcome to browse around the tables in the database, but keep in mind that editing data in these tables could break Cortex.

 

It is possible for the Cortex mySQL server to run database driven applications other than Cortex, but we recommend against it, as it may interfere with how Cortex functions. The mySQL server is packaged in a way that you can install and run a standard mySQL server alongside it. We prefer that you install your own mySQL server if you need to run your own database server. If your server runs Microsoft Windows the mySQL install file may find Cortex's my.ini config file and overwite it with your new database's configuration file. We recommend backing up the etc/my.ini file if you are going to install your own mySQL server.

 

Mail Server

The RedHat version of Cortex uses the default local installation of sendmail to send its messages. Since Windows does not ship with a mail server enabled by default a custom compiled and configured version of the hMailServer 4.1 server is packaged into the Windows version of Cortex. The server listens on TCP/localhost:2365 and is responsible for sending event messages. hMailServer is located in the hmailserver/ directory on Windows installations. The root mail server also contains mail usage and error logs for your perusal if you are curious or running into messaging problems.

The server is configured to only send messages from Cortex's event system. POP3, IMAP, mailboxes, and other mail servers are not configured by Cortex. If you wish to host mailboxes for users on your Cortex server it is best to install your own mail server on the system.

 

FTP Server

Cortex uses a custom modded version of indiFTPD 1.0.9 to run its FTP server. The server is configured to listen on port TCP/4365. It uses the Cortex user tables stored in its database to dertermine who can authenticate to the FTP server. The FTP server is configured to allow or deny all restrictions on your game instance's file browsers. This is explained in further detail in the FTP section of the User Manual.

 

Clustering Daemon

Cortex's clustering features run through a daemon developed by the Cortex development team. The clustering daemon listens on port TCP/2400 and clustering traffic is encyrpted. The clustering daemon exists in the www/listen.php script on your server and is executed by the PHP binary itself to run in the background.