Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

APE Server setup

Pablo Tejada edited this page Mar 2, 2014 · 12 revisions

If you are already running an APE server just go to Installing server scripts otherwise keep reading.

build from source

It is recommended that you build the APE server from the Github source repo for better performance and comparability with the websocket transport. You may also use the latest(v1.1.2 at the time ) Linux generic binary in the official site.

To build APE from source you must first clone the repository to your server.

git clone https://github.com/APE-Project/APE_Server.git

The APE source code should be in a directory named APE_Server, cd this directory and run the build.sh script to start the building process.

cd APE_Server/
./build.sh

When the building process finishes you wont see a message to let you know it succeeded, it will just stop. If you did not got an error then it succeed. If got any errors while build the server, search for a solution in this Google Group or post a message if you can't find a solution.

configure the server

To configure the server edit the configuration file APE_Server/bin/ape.conf to set the port and ip to bind the server to. Just make sure you use an unused port or you will get an error. Below is an excerpt of options in the Server brackets:

Server {
        port = 6969             # the port number to listen to
        daemon = no             # if yes, APE will run in the background
        ip_listen = 127.0.0.1   # IP address to bind the server to
        domain = auto			
        rlimit_nofile = 10000	
        pid_file = ./ape.pid    # file to store the pid number
}

Once you set you configurations you can start the server by running aped in APE_Server/bin/ like ./aped

You can test your APE server by navigating to it in a browser using your server ip:port or domain:port if your box has a domain assign to it. You should see something like this:

capture

Once you have your server running you can go ahead and install the APS server scripts.

Using session?

Using sessions will allow you to keep the same user information/connection after a page reload or while navigating from page to page. All the live demos use it, and you will most likely use it too. If you will use sessions you have to make sure you add a DNS wildcard to the domain or subdomain with which you will access your APE server. For example my public APE installation is accessible at ape.ptejada.com so the wildcard subdomain i need to create would be *.ape.ptejada.com. Now i can access my APE server from any ape.ptejada.com subdomain, Ex:

1.ape.ptejada.com | 5.ape.ptejada.com | 989.ape.ptejada.com | whatever.ape.ptejada.com

They should all be pointing to your APE server, is kind of an alias that directs all subdomains under ape.ptejada.com to your APE server. Setting the wildcard subdomain may vary from webhost to webhost, OR from registar to registrar. Must likely your host will have an interface that will let you create subdomains and overide DNS record. I first create the subdomain ape for ptejada.com and then subdomain with the name * for ape.ptejada.com. You may also just add the A or CNAME DNS records accordingly.

NOTE: if you will not be using sessions you are not required to have the wildcard subdomain setup. Although it is recommended to have it setup so if in future you decide to use it is ready to go.