2.4 Multiple configuration files
By default the SmartFoxServer configuration is stored in a file called config.xml
Since version 1.5.5 and higher it is possible to save multiple configuration files and tell the server which one to load
at boot time. This can be especially helpful during development for storing different server settings.
The following document briefly illustrates how you can specify which configuration file should be loaded when the server starts.
» Server running standalone
The server is run in standalone mode using a script that depends on the operating system being used:
OS Type | Start script |
Windows | start.bat |
Linux | start.sh |
MacOS X | start.sh |
Other Unix(es) | start.sh |
In order to use a different configuration file, open the start script located in the Server/ folder with your favorite text editor:
java -cp ....... lots of text here ...... it.gotoandplay.smartfoxserver.SmartFoxServer myConfig.xml
» Server running as a service
When running the server as a service the JVM (Java Virtual Machine) is wrapped by a third party software which enables the server to run as daemon. In order to specify an alternative configuration file you will have to follow these simple steps:wrapper.app.parameter.1=it.gotoandplay.smartfoxserver.SmartFoxServer
wrapper.app.parameter.2=myConfig.xml
doc index |