Zero logo

Multi-Servers

Multi-servers enable you to run more than one copy (instance) of The Uniform Server Zero (Apache and MySQL) on the same PC. This requires moving servers to different ports, renaming their executables and the controller executable. Changing the ports also allows you to run The Uniform Server Zero alongside other servers such as IIS. This page details the changes required.

Preliminary

You need to decide if you want to clone an existing WAMP server or create a new one.

A) To create a clone, copy an existing server. Copy the folder UniServerZ and all its content to a new folder. For example, create a new folder named New_UniServer and copy folder UniServerZ to it.

B) To create a new WAMP server, first create a new folder New_UniServer and follow these instructions:

  1. Create a new folder c:\New_UniServer
  2. Download and save the latest controller file (ZeroXV_unicontroller_x_x_x.exe) to folder New_UniServer
  3. The file is a self-extracting archive; double-click on above file to run the extractor.
  4. A new folder C:\New_UniServer\UniServerZ is created containing the controller application UniController.exe and support folders and files.
  5. Download the following plugins and save to folder C:\New_UniServer\UniServerZ.
    • ZeroXV_apache_x_x_x.exe - Apache server
    • ZeroXV_mysql_x_x_x.exe - MySQL server
    • ZeroXV_php_x_x_x.exe - PHP
    • ZeroXV_phpmyadmin_x_x_x.exe - Admin for MySQL server
  6. For each of the above installation files, double-click to run the extractor.
  7. If prompted, allow overwriting of existing files.
  8. If you wish, delete the installation files; they are no longer required.

Note: Remainder of this documentation assumes you are using folder New_UniServer. Substitute this for the folder name you are using.

Controller

You cannot run two instances of UniController.exe; the executable name must be unique.

Change controller name:

  • Rename file C:\New_UniServer\UniServerZ\UniController.exe to C:\New_UniServer\UniServerZ\UniController1.exe
    Note: You can use a different name so long as the name is unique and has the file extension .exe

Change Icon:

To distinguish between instances of Uniform Server Zero, the tray icon requires changing.
The following parameters in configuration file C:\New_UniServer\UniServerZ\home\us_config\us_config.ini allow you to change icon and hover text:

  • ServerType - Set Server type (Valid values WAMP0 to WAMP3 sets icon. Default: WAMP0)
  • ServerTypeText1 - First line of hover text (Default: Uniform Server Zero)
  • ServerTypeText2 - Second line of over text (Default: Portable WAMP Server)
Icons are shown below:
WAMP Icons
From left to right: WAMP0, WAMP1, WAMP2 and WAMP3

Example:

For this example, edit file: C:\New_UniServer\UniServerZ\home\us_config\us_config.ini
Change the following lines:

ServerType=WAMP0
ServerTypeText1=Uniform Server Zero
ServerTypeText2=Portable WAMP Server
   

to:

ServerType=WAMP1
ServerTypeText1=Uniform Server Zero
ServerTypeText2=Portable WAMP Server 1
   

Apache Server

To avoid conflicts when running multi-servers requires the Apache executable to be renamed and the server ports to be changed.

Change Apache server executable:

  • Navigate to folder C:\New_UniServer\UniServerZ\core\apache2\bin
  • Rename Apache executable file from httpd_z.exe to httpd_z1.exe
       ◦ The file name must start with httpd_ followed by any unique string and terminated with file extension .exe
       ◦ For convenience, it is easier just to increment the digit.

Change Apache server ports:

  • Start UniController1.exe
  • Change standard port from 80 to 81:
       ◦ Apache > Change Apache ports > Change Apache port
       ◦ Enter 81 and click OK
       ◦ Note: Again, it is easier just to increment. However, you can enter a different, unique port.
  • Change ssl port from 443 to 444:
       ◦ Apache > Change Apache ports > Change Apache SSL port
       ◦ Enter 444 and click OK
       ◦ Note: Again, it is easier just to increment. However, you can enter a different, unique port.

MySQL Server

To avoid conflicts when running multi-servers requires the MySQL executable to be renamed and the server port to be changed.

Change MySQL server executable:

  • Navigate to folder C:\New_UniServer\UniServerZ\core\mysql\bin
  • Rename MySQL executable file from mysqld_z.exe to mysqld_z1.exe
       ◦ The file name must start with mysqld_ followed by any unique string and terminated with file extension .exe
       ◦ For convenience, it is easier just to increment the digit.

Change MySQL server port:

  • Start UniController1.exe
  • Change standard port from 3306 to 3307:
       ◦ MySQL > Change MySQL port
       ◦ Enter 3307 and click OK
       ◦ Note: Again, it is easier just to increment. However, you can enter a different, unique port.

Summary

With the above modifications, you can run up to four seperate servers.


--oOo--