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.


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


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.


Install on USB memory stick

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


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.


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.



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.


PAC file


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.


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";
  if (shExpMatch(url,"http://localhost:80*")) return "PROXY";
  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";
  if (shExpMatch(url,"http://forum.uniformserver.com/*")) return "PROXY";

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


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


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



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.