Palace Planet the Palace Chat community Portal: Adding A Server Monitor To A Web Page Adding A Server Monitor To A Web Page ================================================================================ admin on 28/04/2009 21:12:00 The Server Monitor can run as a stand-alone java applet, and does not require the rest of the InstantPalace files for it to be operational. Although the Server Monitor never actually shipped with 4.4 Windows servers, the Server Monitor runs successfully on Windows 95/98/ME/NT/2000/XP using a 4.4 Windows server with the proper files and directories in place. *Required Directories and Files First you will need to download the files needed to set up the Server Monitor: Download Server Monitor Files *Explanation Of Contents Clicking the above link will download a file called monitor.zip, which contains the following directories and files: common (directory) Contains 2 directories: images and servermonitor. The servermonitor directory contains a cab, jar, and zip file. Don't unzip the zip file, but leave these files the way they are. pal_admin_stat.html (file) This is the configuration file for the Server Monitor, where you set paths to the cab, jar, and zip files, the connection port to the Palace server, and other settings. index2.html (file) An example of a web page with two frames that displays the Server Monitor in one frame, and another web page in the other frame. A button for connecting to the server is also included. *Upload The Files To Your Web Server Upload the contents of monitor.zip to the top level of your web server. The pal_admin_stat.html file cannot be configured to point to an external Palace Server, so these files should be run from a web server that is on the same machine as your Palace Server. If you are running a Windows 4.4 server, the top level of your web server in a default installation is the Communities.com/PalaceServer directory. In the PalaceServer directory, there should already be directories named bin, conf, logs, and palace. This is where you would place the directories and files contained in monitor.zip. To see if your Server Monitor is working, first launch your Palace server, and then point your web browser to: http://yourdomain.com:9990/index2.html Replace yourdomain.com with your Palace's domain name or numeric IP address. The above URL will work for a web server that is using port 9990, which is the default setting. If your web server uses a different port, then adjust the URL accordingly. *Add The Server Monitor To Your Web Page The index2.html file is an example of a web page with two frames that displays the Resource Center in one frame, and another web page in the other frame. Open the index2.html file with a text editor to examine how the Server Monitor was added to that example page. You can add the Server Monitor to your web page by pointing a frame to the pal_admin_stat.html file. Additional Configuration Data and Miscellaneous Information *Web Pages On Remote Sites The Server Monitor can be used with a remote website, such as a geocites site. A frame on the webpage will need to be pointed to the pal_admin_stat.html file, and the pal_admin_stat.html file needs to be on the same machine as your Palace server. A Windows 4.4 Palace server comes with a web server that runs transparently in the background whenever the Palace server is running. With a default PalaceServer installation, and following the instructions above regarding file placement, the URL of the pal_admin_stat.html file would be: http://yourdomain.com:9990/pal_admin_stat.html Replace yourdomain.com with your Palace's domain name or numeric IP address. The above URL will work for a web server that is using port 9990, which is the default setting. If your web server uses a different port, then adjust the URL accordingly. Point a frame from the geocities (or other remote site) web page to the URL of the pal_admin_stat.html file, and the Server Monitor should display on the web page at the remote website. *Check The Paths Open the pal_admin_stat.html file with a text editor. Check the paths to the jar and zip files by locating the lines in the pal_admin_stat.html file with the entries below. The default settings for the two Netscape archives and the Mac version of Internet Explorer archives are: ARCHIVE=/common/servermonitor/paladminstat.jar ARCHIVE=/common/servermonitor/paladminstat.zip ARCHIVE=/common/servermonitor/paladminstat.jar The setting for the path to the cab file for Windows versions of Internet Explorer is located at the top of the parameters section, which is located near the end of the pal_admin_stat.html file. The default entry is: *Check The Port By default, the pal_admin_stat.html file points to Palace connection port 9998. If your server accepts Palace connections on a port other than 9998, then this needs to changed in the parameters section of the pal_admin_stat.html file. The default entry is: *Set The Button's Destination Near the top of the pal_admin_stat.html file you can set the destination for the "Connect To This Palace Now" button. The line that needs to be edited looks like this: *Server Log Entries A Unix or Linux 4.5.1 server will display a log entry every time the java applet updates the Server Monitor data. By default, the server is queried for data every three seconds. This can mean a tremendous amount of log entries if someone leaves their web browser open to the page that displays the Server Monitor. The default value for the query interval can be changed by editing this entry in the parameters section near the bottom of the pal_admin_stat.html file: A Windows 4.4 server will not display the log entries each time the server is queried for information by the java applet, so excessive log entries shouldn't be a problem on the Windows platform.