FlyingAnt Server - FlyingAnt Configuration Files

Note: Usually you will not need to edit these files.

Within the framework there is a folder named "Server" wherein lies three more folders named Linux, OSX and Win32. These folders contain the executable and configuration file for each of the supported platforms. The config files are named "flyingant.conf". To edit them simply use any basic text editor.

listen_ports <port numbers>
A list of ports that the server should listen for connections. In the example framework the port 8091 has been chosen however any port in the range 1025-65535 is acceptable. Only one application may be using any one port on the same computer at the same time. If you feel there may be a conflict with another application (another CD you made using FlyingAnt for instance) then change this port. Remember what you set it to for later though as it will be important. Normally a web server would run on port 80 however it is recommended not to use this port in case of conflicts with other web servers.

open_url <absolute url>
This field specifies a page to launch in the systems default web browser when the server starts running. In this example we have chosen to launch the site index at "http://localhost:8091/index.html". There are two important points in this url. "localhost" specifies that the server is on the local machine, which it is, you could also choose to put here instead which has the same meaning. The second point is the ":8091" after the localhost, this is telling the browser to connect to port 8091 on localhost. If you changed the port number from the default you will also need to change the port number here.

Note that under Linux and OSX FlyingAnt Server does not use this field itself, but rather the automated startup scripts provided in the framework read the config file.

document_root <dir>
In this field a directory that is to be the root of the web server is specified. This is the directory you will end up in if you browse to the web server without specifying any file or folder to browse to within it. Because the server is running off a CD and we can't know the absolute path of the directory on the final system this path must be relative to the web server executable. In this example the root has been set to "..\..\Website\" in the Windows config file and "../../Website/" in the OSX and Linux configs. The major difference between the two being the direction of the slashes, which are different between Windows and Unix style systems. Both have the same final meaning though, browse up two directories then enter the website directory. Please remember that case is important on linux file systems, even though it's not under Windows.

exit_page <relative to root url>
If this line is specified the server will output a html document upon a request to exit (A request sent to "/.exit" in the root of the server). In the example each platform has been given a different exit page, however this is not needed, nor is specifying an exit page at all. In the windows example the exit page is set to "/exit_pages/exit_windows.html", note that this URL is from the server root. If no page is specified then FlyingAnt will simply return a generic shutdown message.

If you are using custom exit pages please make sure to include
in the header, otherwise a browser may retrieve the page from cache rather than sending a request to the server. This would cause the user to see the server shutdown page when the server was in fact still running. Also do not include images or any other external content on exit pages as the server will have shut down and not be able to serve these additional files.

aliases <url1=url2,>
A comma separated list of aliases for the web server to map. In the example each config file has a different alias as follows.

  • Windows "/zoom/search.cgi=/zoom/search_win32.cgi"
  • Linux "/zoom/search.cgi=/zoom/search_linux.cgi"
  • OSX "/zoom/search.cgi=/zoom/search_osx.cgi"

Each of these maps search.cgi in the zoom folder to a different cgi executable for each platform, also note that the paths are from the server root. search.cgi does not actually exist however by doing this any links on your web site linking to the search page will be redirected to the correct search cgi regardless of what platform you are running on. If you place the search cgi's in a location other then the one specified above you will need to alter all the config files.

Space characters (' ') and non-ascii characters (like '') should not be used in the paths as it can prevent the web server from corectly locating and running the CGI.

NOTE: When using a comma separated list for aliases, do not use space characters between the commas.

key <product_key>
This value and the next are not included in the framework example however they are needed to remove the demo message. Once you have purchased FlyingAnt server you will be given a username and a key which must be entered into the config file in order to remove the demo message that appears at the top of every page. This field, as it's name suggests, is where you place the key.

username <registered user>
As per the previous field, this is where your username is placed.

list_directories <0 | 1>
Disable directory listing. By default user may browse the directory structure if no index file is present in the folder they are accessing. Set this to 0 to disable. This field is not specified in the example framework and therefore left on its default.

error_log <filename>
Specify a file to log any errors into. If not specified, as in the framework, then no errors are logged.

check_single <0 | 1> (windows only)
Enable or disable checking to make sure that only one instance of FlyingAnt is running on the computer. This is enabled by default. It is not recommended to disable this as it may allow the user to spawn multiple instances without realizing it.

Next: Burning the CD
Prev: CD Icon & Autostart