UniServer CD: Components
UniServer CD: Introduction | Components |
|
Uniform Server 4.1-Mona UniServer CD |
UniServer CD Components
Should you wish to tailor or modify UniServer CD this page provides pertinent information for all components used.
Apanel
For CD operation a cut down version of Apanel's menu and a modified home page have been included.
These pages are located in folder: UniServer\udrive\home\admin\www
You may wish to tailor start.php to match the CD you are creating.
Auto Run
UniServer CD uses a supper little utility called “Autorun Pro” it is freeware developed by Mark Trescowthick and Ross Mack.
It has stood the test of time and can be downloaded from this web site its under the heading Updated Utility at the end of the page.
A complete version can be found in folder UniServer\udrive\plugins\mona_cd\autorun along with an icon image,
- autorun.inf
- AutorunPro.EXE
- license.txt
- readme.txt
- unicenter.ico
Note: Files autorun.inf, AutorunPro.EXE and unicenter.ico are duplicated in folder UniServer\udrive. These automaticaly run the servers when the CD is inserted.
Note 1: Replace unicenter.ico with your own icon image.
For completeness autorun.inf contains the following code (comments removed) there is no need to change this:
[Autorun] open=AutoRunPro.exe action=AutoRunPro.exe icon=unicenter.ico [AutorunPro] Run1=cd_start.bat Run2="UniTray2_cd.exe" Run3="FirefoxPortable\FirefoxPortable.exe"
Note 1: Autorun can be run from either a USB memory stick or CD
Note 2: For testing on a USB memory stick all you need to do is double click on AutoRunPro.exe it will execute all commands in autorun.inf under section [AutorunPro]. No need to reinsert the memory stick hence an ace little utility.
Portable Firefox
Because of its flexibility portable Firefox is an excellent component to use; can be run from a hard drive, USB memory stick or CD. It is regularly updated, should you wish to update UniServer CD make the following changes:
- Copy file UniServer\udrive\FirefoxPortable\FirefoxPortable.ini to a safe place
- Copy file UniServer\udrive\FirefoxPortable\Data\profile\user.js to a safe place
- Replace UniServer\udrive\FirefoxPortable folder with the extracted folder (Download Firefox Portable 3).
- Run Firefox portable, double click on file UniServer\udrive\FirefoxPortable\FirefoxPortable.exe when prompted Disable Session Store
- Navigate to a few pages this gives Firefox something to save
- Exit Firefox, most important in the pop-up do you want Firfox to save your tabs make sure to check the box Do not ask next time click Quit.
- Copy the file FirefoxPortable.ini back to the new folder UniServer\udrive\FirefoxPortable
- Copy the file user.js back to the new folder UniServer\udrive\FirefoxPortable\Data\profile
- Rename the file UniServer\udrive\FirefoxPortable\App\Firefox\firefox.exe to firefox_cd.exe (makes it unique and easier to kill)
Note: FirefoxPortable.ini contains the following:
[FirefoxPortable] FirefoxDirectory=App\firefox ProfileDirectory=Data\profile PluginsDirectory=Data\plugins SettingsDirectory=Data\settings FirefoxExecutable=firefox_cd.exe AdditionalParameters= LocalHomepage= DisableSplashScreen=false DisableIntelligentStart=false AllowMultipleInstances=true SkipChromeFix=true SkipCompregFix=true WaitForFirefox=false RunLocally=true
Branding
Change branding (prevents first time run page opening
)
Folder: UniServer\udrive\FirefoxPortable\App\Firefox\defaults\pref
File: firefox-branding.js
Disable this line as shown
//pref("startup.homepage_welcome_url","http://%LOCALE%.www.mozilla.com/%LOCALE%/%APP%/%VERSION%/firstrun/");
PAC
Vista imposes restrictions on updating the “hosts” file, UniServer CD uses a PAC file to resolve these issues.
A PAC file allows a browser to resolve web-addresses without recourse to either a "hosts" file or DNS server. The file contains a list of address resolving them to localhost (127.0.0.1:80).
The file is named my_hosts.pac and located in folder: UniServer\www
Edit this file as required, it should contain any virtual hosts you are using (see note 2).
A default installation has two entries, the first localhost* is required.
The second is specific for Apanel.
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 ""; }
Note 1: If you use the server move script it automatically updates the PAC file.
Note 2: If you add Vhosts using Apanel the PAC file is automatically updated.
Note 3: A a browser resolves Internet addresses in the following order, looks in PAC file, then hosts file and finally makes a request to a DNS server. When an address has been resolved the sequence terminates.
Firefox PAC
The following is background information only, no need to edit anything in this section.
Firefox can locate a PAC file using either of two methods:
- Using a Web-address (PAC file located on a local or remote server)
- Usin an absolute file address (PAC file located on local machines drive)
UniServer CD uses the web address method while UniServer USB uses the absolute file path method.
Location of the PAC file is defined in user.js
user_pref("network.proxy.type", 2); user_pref("network.proxy.autoconfig_url", "http://127.0.0.1:80/my_hosts.pac");
The last line informs Firefox to look in the local host server's root folder for the PAC file.
Its placed in the root folder for convenience an alternative location could be used however this would require modifications to Apache’s configuration file.
Although it adds clutter to the root folder for a CD its acceptable.
Note: Port number (80) is automatically updated after using either move-server script or apanels Apache configuration.