UniServer USB: UniServer USB V55

From The Uniform Server Wiki
Revision as of 17:27, 15 December 2009 by Ric (talk | contribs) (New page: {{Nav UniServer USB}} '''UniServer USB V55''' This plugin integrates portable Firefox into Uniform Server 5.5-Nano’s architecture. This allows Uniform Server to be run independently of ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 V55

This plugin integrates portable Firefox into Uniform Server 5.5-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).

Install

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

Option 1

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

Note: Several Uniform Server files are updated. Portable Firefox is extracted to folder FirefoxPortable.

Option 2

  1. Unpack a new copy of Uniform Server 5.5-Nano.
  2. Download file V55UniServer_USB_1.0.zip from Sourceforge
  3. Save to any folder
  4. Extract files, navigate to folder V55UniServer_USB_1.0
  5. Copy its entire contents folder UniServer
  6. New files are added to folders UniServer.

Note: Several Uniform Server files are updated.

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

Summary

Although UniServer USB V55 is complete you may want to tailor the system for your specific use. The next page describes components used and how to modify or update them.

Top