UniServer USB: UniServer USB V56

From The Uniform Server Wiki
Jump to navigation Jump to search

 

UniServer USB plugin
Uniform Server 4.1-Mona
Uniform Server 5.5-Nano
Uniform Server 5.6-Nano

UniServer USB V56

This plugin integrates portable Firefox into Uniform Server 5.6-Nano’s architecture. This allows Uniform Server to be run independently of the host PC. To achieve this it uses Portable Firefox and a PAC file. (PAC file prevents issues with Vista and W7 "hosts" file).

Uniform Server 5.6-Nano series fully supports the USB plugin. Control architecture automatically detects an installed USB plugin and switches control logic accordingly.

This means the USB plugin no longer modifies any of Uniform Server’s files, any changes you have made to Uniform Server are not overwritten. Another advantage of this tight control integration is an easier method of upgrading FireFox. Should you wish to remove the plugin deletion of two folders is all that is required.

Install

Depending on the file downloaded use one of the following installation mthods:

Option 1

  1. Unpack a new copy of Uniform Server 5.6-Nano.
  2. Download file V56UniServer_USB_1.1.exe from Sourceforge
  3. Save it to folder UniServer.
  4. To extract files, double click on file V56UniServer_USB_1.1.exe, no need to change the path.
  5. New files are added to folders UniServer.

Note: Portable Firefox is extracted to folder FirefoxPortable.

Option 2

  1. Unpack a new copy of Uniform Server 5.6-Nano.
  2. Download file V56UniServer_USB_1.1.zip from Sourceforge
  3. Save to any folder1
  4. Extract files, navigate to folder V55UniServer_USB_1.1
  5. Copy its entire contents to folder UniServer

Top

Run local hard drive

When running on a local hard drive start the servers using Start.exe or the batch files in folder alternative_control.

Running on a local hard drive allows faster development

The server is independent of the host PC and no longer uses a host's browser or "hosts" file. Instead the integrated Portable Firefox and PAC file are used.

Top

Install on USB memory stick

Copy the entire content of folder UniServer to the root (top-level) of a USB memory stick.

Run

The servers are automatically run when memory stick is inserted into a USB port, just click run at the alert pop-up.

If you choose not to automatically run the servers you need to manually run them.

To manually start UniTray use either Start.exe or AutorunPro.EXE, always close servers from UniTray.

Top

Port conflicts

If you whish to run the servers either alongside another running server or if there are port conflicts run the move server script.

From UniTray select Advanced > Move Servers multi-server operation (third menu idem)

Aternatively navigate to folder UniServer\unicon\move_servers and run batch file Run.bat

Note: When prompted you can enter new parameters however quickest method is to accept the proposed values by pressing enter at every prompt.

Top

UniTray

UniTray provides convenient links to display various server web pages and information.

In order to display server web pages portable Firefox is automatically restarted with the new page parameter. It’s a minor irritation however this method is required to avoid Windows opening it’s default browser.

Note: All server web pages are reflected in Apanel. Hence Apanel is the only link you need to use from UniTray.

Top

PAC file

Background:

Browsers resolve a web-address by first checking a PC’s “hosts” if unresolved sends a request to a DNS server. Localhost is resolved with an entry in the “hosts” file however some PC’s may not have this “hosts” file hence the server will fail to load correct page. Vista and W7 security makes it difficult to update this file.

Added to this for development you may be running several Apache virtual hosts which require an entry in the “hosts” file.

Solution:

For a portable development server the above becomes significant hence reason for integrating Portable Firefox this has been enabled to use a PAC file. When a web-address requires resolving this file is checked first then the “hosts” file and lastly a DNS request.

The PAC file resolves localhost and any required Apache virtual hosts thus avoiding the need for a local “hosts” file.

The file is named my_sites.pac and located in folder UniServer\pac it contains this single function.

 function FindProxyForURL (url, host){
  if (shExpMatch(url,"http://localhost*")) return "PROXY 127.0.0.1:80";
  if (shExpMatch(url,"http://localhost:80*")) return "PROXY 127.0.0.1:80";
  return "";
 }

Do not remove the lines “localhost” they are required. Below these add as many lines as you like one for each virtual host. For example:

 
  if (shExpMatch(url,"http://wiki.uniformserver.com/*")) return "PROXY 127.0.0.1";
  if (shExpMatch(url,"http://forum.uniformserver.com/*")) return "PROXY 127.0.0.1";

Note: If you use Apanels's "Virtual Host Admin" entries are automatically inserted into the my_sites.pac file.

Top

Deleting UniServer USB V56

If you have used Apanel to create "Virtual Hosts" prior to deleting the plugin you may want to copy any Vhost entries in the PAC file to your PC hosts file.

Open file UniServer\pac\my hosts.pac copy domains you entered to your PC’s host file.

Remove plugin

Delete folders:

  • UniServer\FirefoxPortable
  • UniServer\pac

Top

Upgrading Firefox

Upgrading to a newer version of Firefox Portable is extremely easy; just install a new copy of Firefox Portable right over your old one.

Uniform Server has several user data profile files configured these are all preserved.

To complete the upgrade, rename Firefox executable as follows.

  • Delete file UniServer\FirefoxPortable\App\Firefox\firefox_usb.exe
  • Rename file UniServer\FirefoxPortable\App\Firefox\firefox.exe
  • To: UniServer\FirefoxPortable\App\Firefox\firefox_usb.exe

Note 1: Name change is required to remove ambiguity when servers are moved to difference ports using the move server option from UniTray.

Note 2: Download the latest version of Firefox Portable from http://portableapps.com

Top

Summary

With the release of Uniform Server 5.6 series having full USB V56 plugin support means upgrading this plugin is easy.

Firefox regularly update if an update is security related ensure you update the USB plugin accordingly.

Top