5.0-Nano: UniTray: Difference between revisions
(2 intermediate revisions by the same user not shown) | |||
Line 22: | Line 22: | ||
| | | | ||
'''Run Servers as standard Program''' | '''Run Servers as standard Program''' | ||
* Start UniTray | * '''''Start UniTray'':''' In folder UniServer double click on '''Start.exe''' tray icon created. | ||
* '''L3)''' Check servers are runnable: Left or Right click '''tray icon > click Server Status'''. <br /> All ports must be free to use. | * '''L3)''' Check servers are runnable: Left or Right click '''tray icon > click Server Status'''. <br /> All ports must be free to use. | ||
* '''L1)''' Start Uniform Server. Left click '''tray icon > click Start UniServer ''' | * '''L1)''' Start Uniform Server. Left click '''tray icon > click Start UniServer ''' | ||
Line 30: | Line 30: | ||
'''Run Servers as a Service''' | '''Run Servers as a Service''' | ||
* Start UniTray | * '''''Start UniTray'':''' In folder UniServer double click on '''Start.exe''' tray icon created. | ||
* '''R3)''' Check servers are runnable: Left or Right click '''tray icon > click Server Status'''. <br /> All ports must be free to use. | * '''R3)''' Check servers are runnable: Left or Right click '''tray icon > click Server Status'''. <br /> All ports must be free to use. | ||
* '''R1)''' Start Uniform Server. Right click '''tray icon > click Install and Run all Services''' | * '''R1)''' Start Uniform Server. Right click '''tray icon > click Install and Run all Services''' | ||
Line 37: | Line 37: | ||
'''''Note'':''' Double click on tray icon to open '''Apanel''' in default browser. | '''''Note'':''' Double click on tray icon to open '''Apanel''' in default browser. | ||
|width="254"| | |width="254"| | ||
[[Image:UniTray_right.gif]] | [[Image:UniTray_right.gif]] | ||
Line 51: | Line 50: | ||
To access this file either | To access this file either | ||
* | *Double click on file UniServer\'''help.bat ''' | ||
Or | Or | ||
*From UniTray Left click '''tray icon > click Server Documentation''' | *From UniTray Left click '''tray icon > click Server Documentation''' | ||
*Page displayed, '''click''' link '''help.html''' | *Page displayed, '''click''' link '''help.html''' | ||
'''''[[#top | Top]]''''' | |||
=== Server Status - ''Diagnostics'' === | |||
Server Status provides a mixed bag of information: | |||
* Before starting servers checks to see if ports are in use which would prevent the servers starting | |||
* Displays what ports servers are configured for. | |||
* Displays what servers are running and in what mode (standard program or service) | |||
* With servers running displays IP address as seen from the Internet. | |||
* Checks servers are accessible from the Internet, uses the above IP address | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
Line 70: | Line 77: | ||
Suppose you want to start the servers without displaying the index page. | Suppose you want to start the servers without displaying the index page. | ||
Locate the following line ( | Locate the following line (Note: Line split to prevent breaking Wiki page ): | ||
<pre> | <pre> | ||
Type: item; Caption: "Start UniServer (Apache MySQL)"; | Type: item; Caption: "Start UniServer (Apache MySQL)"; | ||
Line 91: | Line 98: | ||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
== Start and Stop UniTray == | == Start and Stop UniTray == | ||
With all those start stop files UniTray control looks complex in reality they are slight variations of performing the same thing. If you follow a control path it ends in a single function. This applies not only to UniTray it is the heart of UniServer’s control architecture. | With all those start stop files UniTray control looks complex in reality they are slight variations of performing the same thing. If you follow a control path it ends in a single function. This applies not only to UniTray it is the heart of UniServer’s control architecture. | ||
Line 159: | Line 167: | ||
UniTray is very versatile and easy to use don’t worry about any of the techno babble just use it. | UniTray is very versatile and easy to use don’t worry about any of the techno babble just use it. | ||
[[5.0-Nano: Security & passwords | '''Next page''']] covers security and passwords. | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' |
Latest revision as of 20:49, 20 April 2010
5-Nano: Introduction | Install and Run | Control | DtDNS | Cron| Security features | Enable SSL | Multi-Servers | Perl | UniTray | Security and passwords | Known Issues | Support
|
|
Uniform Server 5.0-Nano UniTray
Aestan Tray was developed by Onno Broekmans and has stood the test of time. There are alternatives but none have the flexibility and controllability as Aestan Tray. It is extremely malleable hence has been integrated into Uniform Server to produce UniTray.
Should you not like UniTray’s offerings edit the configuration file to provide the solution you want? Note the configuration file is dynamically updated hence certain items should not be changed these are covered on this page after a basic introduction.
UniTray - Quick start servers
For connivance I have reproduced this section from the introduction page.
There are two menus corresponding to the left and right mouse buttons.
The left menu controls servers as a standard program while the right menu controls the servers as a service.
Ergonomics are such that the order of complexity is from top to bottom with commonality reproduced in both menus for connivance.
LEFT MENU Run servers as a standard program |
COMMENT Quick Start guide |
RIGHT MENU Run servers as a service |
Run Servers as standard Program
Note: Double click on tray icon to open Apanel in default browser. |
In reality server control makes no destitution between running as a standard program or service you are free to mix the two (even from a USB memory stick).
Server control will attempt to perform the action requested, generally if the request is invalid it gets silently ignored (trying to run the servers twice) or a warning message is displayed (Perl shebang update with no Perl plugin).
This interlocking action attempts to prevent inadvertent server failure.
UniTray Help
Detailed information is provided for each menu option in file help.html.
To access this file either
- Double click on file UniServer\help.bat
Or
- From UniTray Left click tray icon > click Server Documentation
- Page displayed, click link help.html
Server Status - Diagnostics
Server Status provides a mixed bag of information:
- Before starting servers checks to see if ports are in use which would prevent the servers starting
- Displays what ports servers are configured for.
- Displays what servers are running and in what mode (standard program or service)
- With servers running displays IP address as seen from the Internet.
- Checks servers are accessible from the Internet, uses the above IP address
Configuration
UniTrays configuration file allows you to delete, add or modify menu items.
Location: UniServer\unicon\tray_menu\UniTray1.ini
Note: If you have moved the servers, the ini file will be renumbered accordingly.
Scanning down the file you will notice it is split into sections left, right and common menus.
Suppose you want to start the servers without displaying the index page.
Locate the following line (Note: Line split to prevent breaking Wiki page ):
Type: item; Caption: "Start UniServer (Apache MySQL)"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\start_servers.php 7"; ShowCmd: hidden; Glyph: 9
Replace with this:
Type: item; Caption: "Start UniServer (Apache MySQL)"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\start_servers.php 3"; ShowCmd: hidden; Glyph: 9
Difference between the two lines is the parameter passed to the script start_servers.php
Parameters are binary coded ( see Script Parameters) and override defaults changing from 7 to 3 starts only Apache and MySQL servers.
The corresponding parameter for stop servers should be changed accordingly.
Start and Stop UniTray
With all those start stop files UniTray control looks complex in reality they are slight variations of performing the same thing. If you follow a control path it ends in a single function. This applies not only to UniTray it is the heart of UniServer’s control architecture.
It’s probably worth following one of these paths for example UniTray’s stop.
Stop_UniTray.bat
All batch files are nothing more than a user interface to run a PHP CLI script.
UniServer\unicon\tray_menu\Stop_UniTray.bat containes the following line:
..\..\usr\local\php\php-win.exe -n stop_unitray.php
This line runs PHP interpreter which in turn runs the script stop_unitray.php
It uses relative paths for portability
stop_unitray.php
All PHP scripts run from a batch file perform as the first task a server move check.
If servers have moved they are reconfigured accordingly, the script then continues.
UniServer\unicon\tray_menu\stop_unitray.php containes the following lines:
run_location_tracker(); // Have servers moved update configuration accordingly stop_unitray(); // Run stop function
stop_unitray()
All server control functions are located in file:
UniServer\unicon\main\includes\functions.php
After removing irrelevant information the function stop_unitray() looks like this:
global $us_con_tray_menu; // Location of UniTray $UniTray_exe = get_unitray_exe(); // get program name $UniTray_id = get_unitray_id(); // get id name $cmd1 = "start ".$us_con_tray_menu."/".$UniTray_exe; // path to executable $cmd2 = " -quit -id=".$UniTray_id; // set ID $cmd =$cmd1.$cmd2; // Unitay does not like / hence $cmd = preg_replace('/\//','\\', $cmd); // Replace / with \ exec($cmd,$dummy,$return); // run command
Real point of showing this function, although it is the last one to be called from our script the function itself assumes things have changed. The server is dynamic UniTray exe may have been renamed likewise the ID in the configuration file may have been updated. Hence these are read from source using the get functions.
Variables not to be change
I mentioned there are several variables in UniTray’s configuration file you should not these are dynamically configured. I have listed these below:
ID=UniTrayController1 | Digit incremented when server moved |
TrayIcon=tray_image_1.dat | Digit incremented when server moved |
USRoot; Value: "%top%"; | Dynamic variable passed UniTray start (top) Type: commandline; Name: top; ParamName: "ustop" |
Summary
UniTray is very versatile and easy to use don’t worry about any of the techno babble just use it.
Next page covers security and passwords.