Framework Web Console's Virtual Directory Fails due to SSI setup when using Apache
|Date:||29 February 2012|
|Product/Release:||Visual LANSA Framework - All versions|
|Abstract:||In certain situations, the Apache configuration might require 'AddType' for the VLF Virtual Directory test to pass|
|Submitted By:||LANSA Technical Support|
When setting up a VLF Web system with an Apache Web Server, one of the required steps is to define your VLF real and virtual paths by using the Administrator Console (via Function VFU0402 in Process VF_PR004).
If the Virtual Directory test fails with a corrupted string similar to the string in the image, there are several areas to check (the example below are the settings for English):
- 1. Check the Apache configuration to ensure it has the correct values
for [DefaultFsCCSID] and [DefaultNetCCSID]. For example, for an IBM i with
language id ENU, it should be like this:
- Check to ensure [AddOutputFilter] is defined with .shtml and .pgm:
- If the problem remains you should test SSI (Server Side Includes) by
using a static file to include a .html file and an .INC file.
- Download the static files 't0561_xStaticSSI.shtml' and 't0561_Test.html'.
- Clear the VLF temporary files folder (refer to the VLF documentation if you are unsure what is a VLF Temporary Files folder).
- Place both files into the VLF system's temporary files folder.
- Open Internet Explorer and type
http://<path to temp files folder>/'t0561_xStaticSSI.shtml'.
If the page shows Hello World, then continue. Otherwise there is a problem most likely in your web server configuration. You should not continue until you can run this page successfully.
- Run the console and click on 'Save and Verify Values'.
After this there should be an .INC file in the temporary files folder.
- Edit 't0561_xStaticSSI.shtml'and replace "t0561_Test.html" in
<!--#include virtual="t0561_Test.html" -->
with the full name of the .INC file, e.g. 'VF_Work_327179123656916.INC'.
- Repeat step d.
If the problem persists it could be that the webserver is not treating the .INC file as a text file and therefore not making the code page conversion as per web server configuration.
Add an Apache setting 'AddType text/plain .INC'
in the area of the Apache web server configuration:
Restart the web server and clear the browser cache before executing the Admin Console to regenerate the Virtual Directory Test again.