Old:4.0-Mona: Multi-Servers: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:
'''Install – Multi-Servers'''
'''Install – Multi-Servers'''


Running more than a single instance of Uniform Server requires changing the standard port for Apache and MySQL and changing Apache’s executable name to something unique.
With the introduction of Uniform Server 4.1-Mona running multi-servers is made extremely easy using its inbuilt plugin. This plugin allows you to move the servers to different ports renaming executables and services to avoid conflicts.


I have split this section into two parts the first is a general method and does not use UniController. The second part assumes you will use only UniController to control the servers.
Although this was possible with 4.0-Mona it required editing a number of files which was prone to error.


If you wish combine both methods this allows total control meaning you can use either the batch files or UniController.  
Why would you want to run several servers on the same PC? It allows you to experiment within a single environment and explore front and backend servers. Another use, with each server being independent you can host a single application allowing you to have a personal MediaWiki and say another with Wordpress both running from their own USB memory sticks.


'''''Note'':''' If you are using UniTray the batch files will need changing.  
== Background ==
Unlike earlier versions of Uniform Server all scripts in 4.1-Mona directly obtain port information from Apache and MySQL configuration files. In addition executable names are not assumed they are checked at source. Hence if any of these parameters are changed they are automatically picked up allowing the servers to be moved.


'''''[[#top | Top]]'''''
Uniform Server’s security features track these changes preventing false security alerts.
== Install - Multi-Servers - Excludes UniController ==
Uniform Server 4.0-Mona is very flexible it is easyily modified to run more than one instance.
 
Start with a new copy of 4.0-Mona
 
'''''US 4.0-Mona defaults'':''' Apache ports '''80''' and 443 (ssl) MySQL port '''3306'''
 
The following example shows how to change these to give a server with the following values:
 
Apache port 8080 and 444 (ssl) - MySQL port 3308


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
== Running move server script ==
I recommend starting with a fresh install of Uniform Server (just extract it to any folder). The script reads current server configuration and increments their values these are both displayed. Incremented values are only recommendations you can override these if you wish.


=== Step 1) Move server port 80 to port 8080 ===
'''Run Script:'''
Edit File \udrive\usr\local\apache2\conf\'''httpd.conf'''
* Navigate to folder   UniServer\udrive\plugins\'''move_servers'''
Change three occurrences (lines 124, 285 and 981) of 80 to 8080
* Double click on '''Run.bat'''
{|
* Press '''enter''' at each input prompt.
|-
* That’s all you need to do, a typical run looks similar to this:
|'''''Original'''''||  ||'''''New'''''
|-
|
<pre>
Listen 80                ------- (line 124)
ServerName localhost:80  ------- (line 285)
<VirtualHost *>
  ServerName localhost:80 ---- (line 981)
  DocumentRoot /www
</VirtualHost>
</pre>
|
&nbsp;
|
<pre>
Listen 8080
ServerName localhost:8080
<VirtualHost *>
  ServerName localhost:8080
   DocumentRoot /www
</VirtualHost
</pre>
|}
'''''[[#top | Top]]'''''
=== Step 2) Move server (ssl) port 443 to port 444 ===
Edit File \udrive\usr\local\apache2\conf\'''ssl.conf'''
Change three occurrences (lines 9, 30 and 31) of 443 to 444
{|
|-
|'''''Original'''''||&nbsp;&nbsp;||'''''New'''''
|-
|
<pre>
<pre>
Listen 443                  --- (line 9)
Current Apache port = 80        Proposed port [81] :
NameVirtualHost *:443      --- (line 30)
Current SSL port   = 443        Proposed port [444] :
<VirtualHost _default_:443> ----(line 31)
Current MySQL port = 3306      Proposed port [3307] :
</pre>
Current Apache name = Apache.exe Proposed name [Apache1.exe] :
|
&nbsp;
|
<pre>
Listen 444                 
NameVirtualHost *:444     
<VirtualHost _default_:444>
</pre>
|}
'''''[[#top | Top]]'''''
 
=== Step 3) Move MySQL Port from 3306 to 3308 ===
Edit File \udrive\usr\local\mysql\bin\'''my.cnf'''
 
Change two occurrences (lines 11 and 20) of 3306 to 3308
 
'''''[[#top | Top]]'''''
 
=== Step 4] Edit config.inc.php ===
Edit file: \udrive\home\admin\www\phpMyAdmin\'''config.inc.php'''
 
Change (line 38) from:
<pre>
cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
</pre>
To:
<pre>
cfg['Servers'][$i]['port']          = '3308';    // MySQL port - leave blank for default port
</pre>
'''''[[#top | Top]]'''''
 
=== Step 5) Rename Apache executable file ===
Rename Apache executable from:


\udrive\usr\local\apache2\bin\'''Apache.exe'''
===== SERVICE Path and Service names ====


to:
Current Path = c:/UniServer  Proposed path = [c:/UniServer1] :
Current Apache name = Apache2 Proposed name = [Apache3] :
Current MySQL  name = MySQL Proposed name = [MySQL1] :


\udrive\usr\local\apache2\bin\'''Apache_new.exe'''
===== Controller Executable name  ====


'''''Note'':''' '''Apache_new''' can be any name however it must be unique
Current = UniController.exe Proposed [UniController1.exe] :


'''''[[#top | Top]]'''''
===== eAccelerator  ====


=== Step 6a) Edit Stop.bat ===
If running a single server do not disable eAccelerator.
Edit file: UniServer\'''Stop.bat'''
  For multi-servers enter YES


Change:
Disable_eAccelerator type YES or N [YES] :
<pre>
udrive\home\admin\program\pskill.exe Apache.exe c
</pre>
To:
<pre>
udrive\home\admin\program\pskill.exe Apache_new.exe c
</pre>
'''''[[#top | Top]]'''''
=== Step 6b) Edit usb_server_stop.bat ===
Edit file: UniServer\udrive\'''usb_server_stop.bat'''


Change:
Commit type Y or N [Y] :
<pre>
\home\admin\program\pskill.exe Apache.exe C
</pre>
To:
<pre>
\home\admin\program\pskill.exe Apache_new.exe C
</pre>
</pre>
'''''[[#top | Top]]'''''
You can now copy this server to a USB memory stick or run the service script to install as a service.


=== Step 7a) Edit Server_Start.bat ===
Alternatively run it from its current location.
Edit file: UniServer\'''Server_Start.bat'''


Replace two occurrences (lines 106 and 132) of Apache.exe with Apache_new.exe
To create another multi-server install a fresh copy of Uniform Server v4.1-Mona and run the move script '''twice'''. Again this server can be installed on a USB memory stick, installed as a service or run from its current location.


That’s it you can run this alongside the original US 4.0-Mona and any mini-servers.
'''''Note 1'':''' For each new multi-server run the move-server script appropriate number of times.


'''''[[#top | Top]]'''''
'''''Note 2'':''' With the exception of ports 135 and 445 the script does not check for ports in use (would lead to confusion) hence there may be a conflict, run the script again and manually enter your new values. The two ports that are checked are skipped and the next value used.


=== Step 7b) Edit usb_server_start.bat ===
'''''Note 3'':''' Running more than a single server in either Basis or Disk-root mode with eAccelerator cause a conflict hence the need to disable it. However it may be enabled for all servers running as a service and one running in Basic or Disk-root.
Edit file: UniServer\udrive\'''usb_server_start.bat'''  
 
Replace two occurrences (lines 89 and 114) of Apache.exe with Apache_new.exe


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''


=== Step 8a) Edit redirect.html ===
== Power example ==
Edit file: UniServer\udrive\home\admin\www\redirect.html
This is an extreme example however does demonstrate the power of Uniform Server Mona.


Replace: <nowiki>http://localhost/apanel/</nowiki>
The following shows how to set-up five servers, runs two as a service, one basic on hard drive, one disk-root and one basic on a USB memory stick.


With: <nowiki>http://</nowiki>localhost''':8080'''/apanel/
# Create five folders named '''test1 to test5'''
# Extract a copy of Uniform Server 4.1 to '''folder1'''
## Navigate to folder test1\UniServer\udrive\plugins\'''Services'''
## Double click '''Run.bat'''
## Let it install and run as a service.
# Extract a copy of Uniform Server 4.1 to '''folder2'''
## Navigate to folder \test2\UniServer\udrive\plugins\'''move_servers'''
## Double click '''Run.bat'''
## Press enter at all prompts (accepts defaults) – Moves the server to different ports
## Navigate to folder test2\UniServer\udrive\plugins\'''Services'''
## Double click '''Run.bat'''
## Let it install and run as a service.
#  Copy of folder Uniform Server from '''folder2''' to '''folder3'''
## Navigate to folder \test3\UniServer\udrive\plugins\'''move_servers'''
## Double click '''Run.bat'''
## Press enter at all prompts (accepts defaults) – Moves the server to different ports
## Start Servers using UniController
# Copy of folder Uniform Server from '''folder3''' to folder4
## Navigate to folder \test4\UniServer\udrive\plugins\'''move_servers'''
## Double click '''Run.bat'''
## Press enter at all prompts (accepts defaults) – Moves the server to different ports
## Copy Folder '''test4''' to a '''USB memory stick''' (alternatively leave where it is)
## Start Servers using UniController
# Copy of folder Uniform Server from '''folder4''' to '''folder5'''
## Navigate to folder \test5\UniServer\udrive\plugins\'''move_servers'''
## Double click '''Run.bat'''
## Press enter at all prompts (accepts defaults) – Moves the server to different ports
## Copy the contents of folder  test5\UniServer\udrive to USB top-level
## Copy test5\UniServer\'''UniController.exe''' to USB top-level
## Copy test5\UniServer\'''disk_start.vbs''' to USB top-level
## Start Servers using UniController
You now have five running servers.


=== Step 8b) Edit index.php folder www ===
'''''Note'':''' If you cannot remember what ports were assigned run UniControllers test facility; for services check Apache and MySQL configuration files.
Edit file: UniServer\udrive\www\index.php
 
Replace: <nowiki>href="http:</nowiki>//localhost/apanel
 
With: <nowiki>href="http:</nowiki>//localhost''':8080'''/apanel
 
Replace: <nowiki>https:</nowiki>//localhost
 
With: <nowiki>https:</nowiki>//localhost''':444'''
 
=== Step 8c) Edit index.php folder ssl ===
Edit file: UniServer\udrive\ssl\index.php
 
Replace: <nowiki>href="http:</nowiki>//localhost/apanel
 
With: <nowiki>href="http:</nowiki>//localhost''':8080'''/apanel
 
Note: Two lines


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
== Manually move servers ==
You can move the servers manually I have included this section to provide an insight into what the move server script performs.


=== Step 9) Test servers ===
==== Configuration summary ====
That completes moving servers to different ports, start the servers and start original installation of 4.0-Mona both will now run alongside each other.
{|cellpadding="2" cellspacing="2"
|- style="background:#e8e8e8;"
|'''Parameter'''||'''Original configuration'''||'''New Configuration'''
|- style="background:#f5f5f5;"
|Apache port||80||81
|- style="background:#f5f5f5;"
|SSL port||443||444
|- style="background:#f5f5f5;"
|MySQL port||3306||3307
|- style="background:#f5f5f5;"
|Apache name||Apache.exe||Apache1.exe
|- style="background:#f5f5f5;"
|Service path||c:/UniServer||c:/UniServer1
|- style="background:#f5f5f5;"
|Service Apache name||Apache2||Apache3
|- style="background:#f5f5f5;"
|Service MySQL name||MySQL||MySQL1
|- style="background:#f5f5f5;"
|Unicontroller name||UniController.exe||UniController1.exe
|}


'''''Note'':''' At this stage you cannot use UniControler additional modifications are required see next section.
==== Manually move ====
 
To move a server manually perform the following:
'''''[[#top | Top]]'''''


== Install – Multi-Servers - Includes UniController ==
==== Service - Optional ====
If you have implemented all the above steps you only need to implement step 10.
Skip this section if you don't want to run as a service


If you only want to use UniController for controlling the servers make sure you implement the following steps first:
# Edit file UniServer\udrive\plugins\Services\'''w2c1.pl'''
## Replace one occurrence of '''c:/UniServer''' with '''c:/UniServer1'''
## Replace one occurrence of '''Apache.exe''' with '''Apache1.exe'''
## Replace one occurrence of '''"Apache2"''' with '''"Apache3"'''
## Replace one occurrence of '''$res=`net start Apache2`'''; with '''$res=`net start Apache3`''';
## Replace one occurrence of '''--install MySQL''' with '''--install MySQL1'''
## Replace one occurrence of '''$res=`net start mysql`''' with '''$res=`net start MySQL1`'''
# Edit file UniServer\udrive\plugins\Services\files\'''Install.bat'''
## Replace four occurrences of '''Apache2''' with '''Apache3'''
## Replace three occurrences of '''MySQL''' with '''MySQL1'''
# Edit file UniServer\udrive\plugins\Services\files\'''Uninstall.bat'''
## Replace two occurrences of '''Apache2''' with '''Apache3'''
## Replace three occurrences of '''MySQL''' with '''MySQL1'''


* Step 1) Move server port 80 to port 8080
==== Required changes ====
* Step 2) Move server (ssl) port 443 to port 444  
# Edit file \udrive\usr\local\php\'''php.ini'''
* Step 3) Move MySQL Port from 3306 to 3308
## Comment the following lines as shown:<br>''';''' extension=eaccelerator.dll<br>''';''' eaccelerator.allowed_admin_path=/home/admin/www/plugins/eaccelerator/control.php<br>''';''' eaccelerator.debug = 0
* Step 4] Edit config.inc.php
# Navigate to folder '''UniServer'''
* Step 5) Rename Apache executable file
## Rename '''UniController.exe''' to '''UniController1.exe'''
* Step 8) Web page absolute links
# Edit file UniServer\udrive\home\admin\program\unicon.txt''' change text from '''UniController.exe''' to '''UniController1.exe'''
# Navigate to folder '''UniServer\udrive\usr\local\apache2\bin'''
## Rename '''Apache.exe''' to '''Apache1.exe'''
## Create a new file named '''unicon.ini'''
## Edit file '''unicon.ini''' and add this section:<br>[APACHE]<br>Apache3.exe
# Edit file UniServer\udrive\usr\local\apache2\conf\'''httpd.conf'''
## Change '''Listen 80''' to '''Listen 81'''
## Change two occurrences of '''ServerName localhost:80''' to '''ServerName localhost:81'''
# Edit file UniServer\udrive\usr\local\apache2\conf\'''ssl.conf'''
## Change two occurrences of '''443''' to '''444'''
# Edit file UniServer\udrive\usr\local\mysql\'''my.cnf'''
## Change two occurrences of '''3306''' to '''3307'''
# Edit file UniServer\udrive\home\admin\www\'''redirect.html'''
## Change '''<nowiki>http://localhost/apanel/</nowiki>''' to '''<nowiki>http://localhost:81/apanel/</nowiki>'''


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
=== Step 10) Create a configuration file ===
== Summary ==
UniController needs to pick-up the new Apache file name create a new text file '''unicon.ini''' with the following content:
When manually moving a server although there are a number of steps to perform it is relatively easy.
<pre>
[APACHE]
apache_exe=Apache_new.exe
</pre>
Save this file to folder: \'''udrive\usr\local\apache2\bin'''
 
When UniController is run it checks for the existence of file '''unicon.ini''' and picks up the new Apache file name, if file does not exist uses default name Apache.exe.
 
'''''[[#top | Top]]'''''
 
== Install – Multi-Servers running as a service ==
Prior to installing Uniform Server 4.0-Mona as a service perform the following on a new copy of 4.0-Mona:
 
* Step 1) Move server port 80 to port 8080
* Step 2) Move server (ssl) port 443 to port 444
* Step 3) Move MySQL Port from 3306 to 3308
* Step 4) Edit config.inc.php
* Step 5) Rename Apache executable file
* Step 8) Web page absolute links
 
'''''Note 1'':'''At step 5 use the following name '''Apache1.exe''' for the executable.
 
'''''Note 2'':''' Ensure both the service and Apache executable names have no more that eight characters.
 
Now implement new steps Step 11 and 12:
'''''[[#top | Top]]'''''
=== Step 11) w2c1.pl Change drive and or folder ===
Optionally change the drive letter however the folder name must be changed.
 
This example uses '''UniServer1'''
 
Edit the following file:  \UniServer\udrive\plugins\Services\'''w2c1.pl'''
 
Locate the line (line 18): '''$pathc="c:/UniServer"'''; and change to suite your requirements e.g.
<pre>
# Change this line to drive and folder required
# $pathc="e:";          -- Would install to drive e (top-level of disk)
# $pathc="h:/myserver"; -- Would install to drive h sub-folder myserver 
 
$pathc="c:/UniServer1";
</pre>
 
'''''[[#top | Top]]'''''
=== Step 11a) w2c1.pl Change service names  ===
Change Apache executable name and service names.
 
Edit the following file:  \UniServer\udrive\plugins\Services\'''w2c1.pl'''
 
Change this section (starting at line 99):
 
'''''From:'''''
<pre>
print "Installing Apache2 as service ...";
$res=`$pathc/usr/local/apache2/bin/Apache.exe -f $pathc/usr/local/apache2/conf/httpd.conf
  -d $pathc/usr/local/apache2/. -k install -n "Apache2"`;
print " done!\n";
print "Installing MySQL as service ...";
$res=`$pathc/usr/local/mysql/bin/mysqld-opt.exe  --install MySQL --defaults-file=$pathc/usr/local/mysql/my.cnf`;
print " done!\n";
print "Starting Apache2 ...";
$res=`net start Apache2`;
print " done!\n";
print "starting MySQL ...";
$res=`net start MySQL`;
</pre>
</pre>
 
'''''To:'''''
<pre>
print "Installing Apache2 as service ...";
$res=`$pathc/usr/local/apache2/bin/Apache1.exe -f $pathc/usr/local/apache2/conf/httpd.conf
    -d $pathc/usr/local/apache2/. -k install -n "Apache3"`;
print " done!\n";
print "Installing MySQL as service ...";
$res=`$pathc/usr/local/mysql/bin/mysqld-opt.exe  --install MySQL3 --defaults-file=$pathc/usr/local/mysql/my.cnf`;
print " done!\n";
print "Starting Apache2 ...";
$res=`net start Apache3`;
print " done!\n";
print "starting MySQL ...";
$res=`net start MySQL3`;
</pre>
 
'''''[[#top | Top]]'''''
 
=== Step 12) Change service name ===
When running muti-servers as a service their service names must be unique in this example the new service names are '''Apache3''' and '''MySQL3'''.
 
Edit file: UniServer\udrive\plugins\Services\files\'''Install.bat'''
 
Change these lines:
<pre>
C:\UniServer\usr\local\apache2\bin\Apache.exe -k install -n "Apache2"
C:\UniServer\usr\local\mysql\bin\mysqld-opt.exe --install MySQL --defaults-file=C:\UniServer\usr\local\mysql\my.cnf
net start Apache2
net start MySQL
</pre>
To:
<pre>
C:\UniServer\usr\local\apache2\bin\Apache1.exe -k install -n "Apache3"
C:\UniServer\usr\local\mysql\bin\mysqld-opt.exe --install MySQL3 --defaults-file=C:\UniServer\usr\local\mysql\my.cnf
net start Apache3
net start MySQL3
</pre>
 
Edit file: UniServer\udrive\plugins\Services\files\'''Uninstall.bat'''


Change these lines:
Using 4.1-Mona's in-built script it is extremely easy to move a server requiring just a few key presses.
<pre>
net stop MySQL
net stop Apache2
usr\local\apache2\bin\Apache.exe -k uninstall -n "Apache2"
usr\local\mysql\bin\mysqld-opt.exe --remove MySQL
</pre>
To:
<pre>
net stop MySQL3
net stop Apache3
usr\local\apache2\bin\Apache1.exe -k uninstall -n "Apache3"
usr\local\mysql\bin\mysqld-opt.exe --remove MySQL3
</pre>
 
'''''Note 1'':''' Ensure both the service and Apache executable names have no more that eight characters and no spaces.
 
'''''Note 2'':''' Install the new server as a service by running the batch file: \UniServer\udrive\plugins\Services\'''Run.bat'''
 
'''''[[#top | Top]]'''''
 
== Remember ==
After changing ports remember these need to be included when entering a web address.
{|
|-
!Old!!&nbsp;&nbsp;!!New
|-
|<nowiki>http://localhost</nowiki> ||&nbsp;||<nowiki>http://localhost:8080</nowiki>
|-
|<nowiki>https://localhost</nowiki> ||&nbsp;||<nowiki>https://localhost:8080</nowiki>
|}
In addition when installing scripts that request a MySQL server name instead of using localhost use localhost:3308
 
If given the option to enter a port number do so and then use localhost for the server name.
'''''[[#top | Top]]'''''
 
== Related links ==
[[Reverse Proxy Server: Introduction | Reverse Proxy Server Introduction]]
 
[[Mini Servers: Apache 2.2.9 Service#Multi Servers | Mini Servers Service]]
 
'''''[[#top | Top]]'''''
 
== Summary ==
Although there are a number of steps to perform it is relatively easy to create multi servers using Uniform Server 4.0-Mona.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''

Revision as of 23:08, 3 April 2009

 

The Uniform Server 4-Mona

Install – Multi-Servers

With the introduction of Uniform Server 4.1-Mona running multi-servers is made extremely easy using its inbuilt plugin. This plugin allows you to move the servers to different ports renaming executables and services to avoid conflicts.

Although this was possible with 4.0-Mona it required editing a number of files which was prone to error.

Why would you want to run several servers on the same PC? It allows you to experiment within a single environment and explore front and backend servers. Another use, with each server being independent you can host a single application allowing you to have a personal MediaWiki and say another with Wordpress both running from their own USB memory sticks.

Background

Unlike earlier versions of Uniform Server all scripts in 4.1-Mona directly obtain port information from Apache and MySQL configuration files. In addition executable names are not assumed they are checked at source. Hence if any of these parameters are changed they are automatically picked up allowing the servers to be moved.

Uniform Server’s security features track these changes preventing false security alerts.

Top

Running move server script

I recommend starting with a fresh install of Uniform Server (just extract it to any folder). The script reads current server configuration and increments their values these are both displayed. Incremented values are only recommendations you can override these if you wish.

Run Script:

  • Navigate to folder UniServer\udrive\plugins\move_servers
  • Double click on Run.bat
  • Press enter at each input prompt.
  • That’s all you need to do, a typical run looks similar to this:
 Current Apache port = 80         Proposed port [81] :
 Current SSL port    = 443        Proposed port [444] :
 Current MySQL port  = 3306       Proposed port [3307] :
 Current Apache name = Apache.exe Proposed name [Apache1.exe] :

 ===== SERVICE Path and Service names ====

 Current Path = c:/UniServer   Proposed path = [c:/UniServer1] :
 Current Apache name = Apache2 Proposed name = [Apache3] :
 Current MySQL  name = MySQL Proposed name = [MySQL1] :

 ===== Controller Executable name  ====

 Current = UniController.exe Proposed [UniController1.exe] :

 ===== eAccelerator  ====

 If running a single server do not disable eAccelerator.
 For multi-servers enter YES

 Disable_eAccelerator type YES or N [YES] :

 Commit type Y or N [Y] :

You can now copy this server to a USB memory stick or run the service script to install as a service.

Alternatively run it from its current location.

To create another multi-server install a fresh copy of Uniform Server v4.1-Mona and run the move script twice. Again this server can be installed on a USB memory stick, installed as a service or run from its current location.

Note 1: For each new multi-server run the move-server script appropriate number of times.

Note 2: With the exception of ports 135 and 445 the script does not check for ports in use (would lead to confusion) hence there may be a conflict, run the script again and manually enter your new values. The two ports that are checked are skipped and the next value used.

Note 3: Running more than a single server in either Basis or Disk-root mode with eAccelerator cause a conflict hence the need to disable it. However it may be enabled for all servers running as a service and one running in Basic or Disk-root.

Top

Power example

This is an extreme example however does demonstrate the power of Uniform Server Mona.

The following shows how to set-up five servers, runs two as a service, one basic on hard drive, one disk-root and one basic on a USB memory stick.

  1. Create five folders named test1 to test5
  2. Extract a copy of Uniform Server 4.1 to folder1
    1. Navigate to folder test1\UniServer\udrive\plugins\Services
    2. Double click Run.bat
    3. Let it install and run as a service.
  3. Extract a copy of Uniform Server 4.1 to folder2
    1. Navigate to folder \test2\UniServer\udrive\plugins\move_servers
    2. Double click Run.bat
    3. Press enter at all prompts (accepts defaults) – Moves the server to different ports
    4. Navigate to folder test2\UniServer\udrive\plugins\Services
    5. Double click Run.bat
    6. Let it install and run as a service.
  4. Copy of folder Uniform Server from folder2 to folder3
    1. Navigate to folder \test3\UniServer\udrive\plugins\move_servers
    2. Double click Run.bat
    3. Press enter at all prompts (accepts defaults) – Moves the server to different ports
    4. Start Servers using UniController
  5. Copy of folder Uniform Server from folder3 to folder4
    1. Navigate to folder \test4\UniServer\udrive\plugins\move_servers
    2. Double click Run.bat
    3. Press enter at all prompts (accepts defaults) – Moves the server to different ports
    4. Copy Folder test4 to a USB memory stick (alternatively leave where it is)
    5. Start Servers using UniController
  6. Copy of folder Uniform Server from folder4 to folder5
    1. Navigate to folder \test5\UniServer\udrive\plugins\move_servers
    2. Double click Run.bat
    3. Press enter at all prompts (accepts defaults) – Moves the server to different ports
    4. Copy the contents of folder test5\UniServer\udrive to USB top-level
    5. Copy test5\UniServer\UniController.exe to USB top-level
    6. Copy test5\UniServer\disk_start.vbs to USB top-level
    7. Start Servers using UniController

You now have five running servers.

Note: If you cannot remember what ports were assigned run UniControllers test facility; for services check Apache and MySQL configuration files.

Top

Manually move servers

You can move the servers manually I have included this section to provide an insight into what the move server script performs.

Configuration summary

Parameter Original configuration New Configuration
Apache port 80 81
SSL port 443 444
MySQL port 3306 3307
Apache name Apache.exe Apache1.exe
Service path c:/UniServer c:/UniServer1
Service Apache name Apache2 Apache3
Service MySQL name MySQL MySQL1
Unicontroller name UniController.exe UniController1.exe

Manually move

To move a server manually perform the following:

Service - Optional

Skip this section if you don't want to run as a service

  1. Edit file UniServer\udrive\plugins\Services\w2c1.pl
    1. Replace one occurrence of c:/UniServer with c:/UniServer1
    2. Replace one occurrence of Apache.exe with Apache1.exe
    3. Replace one occurrence of "Apache2" with "Apache3"
    4. Replace one occurrence of $res=`net start Apache2`; with $res=`net start Apache3`;
    5. Replace one occurrence of --install MySQL with --install MySQL1
    6. Replace one occurrence of $res=`net start mysql` with $res=`net start MySQL1`
  2. Edit file UniServer\udrive\plugins\Services\files\Install.bat
    1. Replace four occurrences of Apache2 with Apache3
    2. Replace three occurrences of MySQL with MySQL1
  3. Edit file UniServer\udrive\plugins\Services\files\Uninstall.bat
    1. Replace two occurrences of Apache2 with Apache3
    2. Replace three occurrences of MySQL with MySQL1

Required changes

  1. Edit file \udrive\usr\local\php\php.ini
    1. Comment the following lines as shown:
      ; extension=eaccelerator.dll
      ; eaccelerator.allowed_admin_path=/home/admin/www/plugins/eaccelerator/control.php
      ; eaccelerator.debug = 0
  2. Navigate to folder UniServer
    1. Rename UniController.exe to UniController1.exe
  3. Edit file UniServer\udrive\home\admin\program\unicon.txt change text from UniController.exe to UniController1.exe
  4. Navigate to folder UniServer\udrive\usr\local\apache2\bin
    1. Rename Apache.exe to Apache1.exe
    2. Create a new file named unicon.ini
    3. Edit file unicon.ini and add this section:
      [APACHE]
      Apache3.exe
  5. Edit file UniServer\udrive\usr\local\apache2\conf\httpd.conf
    1. Change Listen 80 to Listen 81
    2. Change two occurrences of ServerName localhost:80 to ServerName localhost:81
  6. Edit file UniServer\udrive\usr\local\apache2\conf\ssl.conf
    1. Change two occurrences of 443 to 444
  7. Edit file UniServer\udrive\usr\local\mysql\my.cnf
    1. Change two occurrences of 3306 to 3307
  8. Edit file UniServer\udrive\home\admin\www\redirect.html
    1. Change http://localhost/apanel/ to http://localhost:81/apanel/

Top

Summary

When manually moving a server although there are a number of steps to perform it is relatively easy.

Using 4.1-Mona's in-built script it is extremely easy to move a server requiring just a few key presses.

Top