| # 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 instruction: Create a new folder c:\New_UniServer Download and save the latest controller file (ZeroXIV_controller_2_3_1.exe) to folder New_UniServer The file is a self-extracting archive, double click on above file to run the extrater. A new folder C:\New_UniServer\UniServerZ is created containing the controller application UniController.exe and support folders and files. Download the following plugins and save to folder C:\New_UniServer\UniServerZ. ZeroXIV_apache_2_4_41_j.exe - Apache server ZeroXIV_mysql_8_0_18.exe - MySQL server ZeroXIV_php_7_3_8.exe - PHP ZeroXIV_phpmyadmin_4_9_2.exe - Admin for MySQL server For each of the above installation files double click to run the extracter. If prompted allow overwriting of existing files. If you wish; delete the installation files, they are no longer required. Note: Remainder of this documentation assumes you are using folder New_UniSever 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: Example: 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 on the right: Icons 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.