While this is not a supported use of FAS, hosting a downloaded site on FAS can be useful for Live Assist demonstration or testing among other things and this article will describe how to do it.
Obtaining the Site
There are a number of programs that can download a web site but we will describe configuration for two examples here, SiteSucker and HTTrack. SiteSucker can currently only be installed to MACs, while HTTrack can be installed to Windows and Linux based operating systems.
Site Depth Configuration
These types of application will allow you to configure the depth into the website for which you want to download files. At it's simplest this is the number of levels you can navigate to without needing to access the original website on the internet. As an example if you set a depth of 2, then you could access the home/start page and pages that are linked from this first page, after this you will be re-directed to the original website if you have access to the internet.
However another side affect of limiting the depth when you intend to view the page on a machine that won't have access to the internet, is that pages may not be displayed as expected. The resources needed to display the page, such as images and css files, may be stored deeper into the site than the configured depth and so cannot be accessed. You will have to perform some experimentation with the configured depth to ensure the site is displayed correctly when offline.
Increasing the maximum depth will increase the downloaded sites offline content, but will also increase the size of the resulting artifact so a compromise needs to be made if size and/or time is a factor.
SiteSucker
Once the application is downloaded you might want to configure the depth into the site that SiteSucker will download. To do this navigate to Settings -> Limits, check the Maximum Number of Levels tick box and enter a suitable level count (see Site Depth Configuration above).
You can also change the folder to which the site will be downloaded to in the General section under Download Folder, a folder will be created under this folder named after the name of the site.
HTTrack
Once you have downloaded and started the application you should be presented with a wizard for creating a download project. Click Next on the first screen and you will be presented with a page containing some project options.
Enter a name for your project and select a directory to download the site to. The site will be downloaded to a sub-directory under this Base Path, while the project files and an index.html that links to your stored project sites is included in the base directory itself.
Proceed to the next page by clicking the Next button and you will be presented with download options.
Here you can enter the URL of the site you want to download by clicking the Add URL button. You also may need to set some download options by clicking Set Options. Some common options to alter are under Limits, you should increase the Max transfer rate to speed up download of the site, and you might like to set the Maximum mirroring depth and Maximum external links to limit the number files downloaded, see example configuration below:
This example configuration will create a relatively small download directory, but the downloaded site will be more limited in how many pages you can navigate to locally (see Site Depth Configuration above). The maximum external depth will define what depth of external site (sites not on the same domain and the downloaded site) will be downloaded, so by configuring 0, clicking on an external link anywhere within the site will redirect you to the linked site on the internet.
You will most likely also need to set the address and port of a valid FTP proxy in your environment under the Proxy tab. Once you have configured your desired options then click OK, then Next and then Finish to start the download.
Packaging and Deploying the Site to FAS
Once you have downloaded the site navigate to the created folder (the one named after the site) in a Terminal or Command prompt and enter the following:
jar -cvf filname.war *
Where filename is replaced with you chosen war file name. This will be part of the URL when accessing the site on FAS, so it makes sense for it to be relevant and easy to type. This will archive everything in the current directory into the war file.
Next deploy the site onto FAS using the JBoss Console (https://<FAS address>:9990), and assign to the main-server-group. If you are not sure how to do this consult your FAS Administration Guide.
Accessing the Site
Once the site has been deployed and assigned it can be accessed using by browsing to a URL in the following format in your chosen browser:
http://<FAS Address>:8080/filename
Where filename is your chosen war file name, without the .war extension.
Comments
0 comments
Please sign in to leave a comment.