«

»

Setting up the Smartfox server (SFS)

Readers of my previous post already know that I am currently experimenting with a multi-user flash server software named “smartfoxserver”. All other readers should know this by now…
Despite the ease of use I already mentioned, Matthias and myself had quite a funny session of trial and error when we attempted to run that beast on our Linux server. But the reason for this was that we are not yet Linux uber-geeks, rather than the task itself being complicated.
The SFS documentation already features a section about installation under Linux which you should read and follow. However, after following the simple step-by-step instruction in the docs we needed to do some additional things in order to get it all right:

- we had to make sure that the port 9339, which is the default port for SFS, was not blocked. So we added an appropriate rule to the iptables so that requests on this port can be processed. We did this by typing this directly in the bash:
iptables -I PUB_IN 18 –proto tcp –dport 9339 -j PAROLE
If you are not familiar with iptables at all, you might check out this tutorial series or this command overview. The 18 specifies the index inside the iptables where the rule should be inserted, so you must make sure that you specify a value that works with your current set of rules! Please contact your Linux-admin for further assistance before doing something that you don’t fully understand. It can save you a lot of time and swearing. Just ask Matthias about iptables -F…
This already was the most complicated part (for us) since the Internet is full of different explanations of how to open ports under Linux, but only the above mentioned set of commands did the trick.

- Next thing is to tell the SFS the IP-adress of your gameserver. To do this, go to the SFS installation folder, enter the subfolder “Server” and open the config.xml file. Search for the tag ServerIP and enter your gameserver IP-adress. Remember that you can enter 127.0.0.1 as server IP if you are running the SFS locally on your machine. Nice for testing purposes if you don’t have access to your own gameserver yet.

- The last thing is to add the gameserver to the list of allowed domains for the cross-domain policy file. To read more about what the policy file does and why it is necessary, just check the SFS doc 3.1 (The Basics). Still in the config file, search for the tag AutoSendPolicyFile and make sure it says “true”. In the next line, type something like

<PolicyAllowedDomains>
<AllowedDomain>your gameserver URL or IP-address</AllowedDomain>
</PolicyAllowedDomains>

After these three simple steps (which took us the whole night to figure out…) your Smartfox server should be ready to go!
Remember that changing settings in the config.xml file will only take effect after you restart the SFS!

Popularity: 9% [?]

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">