INTEGRAL Web Server Configuration Keywords
Jump directly to:
MIMETYPE_INTEGRAL_ALL_EXCEPT[]
MIMETYPE_INTEGRAL_NONE_EXCEPT[]
MULTI These two keywords add a new INTEGRAL program handler to INTEGRAL Web Server's list of recognized MIME type handlers and enable it for the specified websites. MIMETYPE_INTEGRAL_ALL_EXCEPT enables the handler for all websites except the ones listed within the square brackets. MIMETYPE_INTEGRAL_NONE_EXCEPT enables the handler only for those websites that are listed within the square brackets.
The websites listed within the square brackets are called exception sites and are specified by their unique order number. The default INTEGRAL website is always website #0, the first additional website spawned using the WEBSRV_EXTRA_SITE keyword is website #1, the second one is #2 etc. If multiple exception sites need to be listed, they are separated by a single comma. If there are no exception sites, nothing should be included inside the square brackets (but the brackets themselves must still be present). For example, MIMETYPE_INTEGRAL_ALL_EXCEPT[0,1,5] activates the handler for all websites except #0, #1 and #5 while MIMETYPE_INTEGRAL_ALL_EXCEPT[] activates the handler for all websites. Similarly, MIMETYPE_INTEGRAL_NONE_EXCEPT[2,4] activates the handler only for websites #2 and #4 while MIMETYPE_INTEGRAL_NONE_EXCEPT[] does not activate the handler for any site.
Immediately after the closing square bracket is the equal sign (=) followed by the value of the keyword. This value is a complex string called a delivery specification. The delivery specification consists of 3 or 4 parts separated by a single colon (:). The first three parts are required, the last one is optional:
Part 1: MIME Type identifier, as defined by IANA's official registry of MIME types
. For example: text/html, image/png, image/svg+xml, text/css, application/zip etc. The specified MIME type will be sent whenever the INTEGRAL program does not set any other program-specific MIME type. In other words, this is the default MIME type when serving the output of INTEGRAL programs.
Part 2: File extension (used for INTEGRAL DSL programs) to be associated with the above MIME Type, in the format *.<extension>. For example: *.i or *.integral.
Part 3: One of the three supported delivery methods: PASS, GZIP, or AUTO. PASS means that the INTEGRAL program output should always be delivered unchanged (i.e. without any additional compression or special handling), GZIP means that the INTEGRAL program output should always be delivered compressed in gzip format, and AUTO means that the output delivery method should be chosen by INTEGRAL Web Server automatically. AUTO is recommended.
Part 4 (optional): max-age to be sent with the Cache-Control HTTP header to the clients when the INTEGRAL program output is served. The max-age directive states the maximum amount of time in seconds that fetched responses are allowed to be used again (from the time when a request is made). For instance, max-age of 90 indicates that a response can be reused (i.e. remain in the browser cache) for the next 90 seconds.
Here are a few examples that demonstrate how to use the MIMETYPE_INTEGRAL_ALL_EXCEPT[] and MIMETYPE_INTEGRAL_NONE_EXCEPT[] keywords.
Example 1a
!MIMETYPE_INTEGRAL_ALL_EXCEPT[]=text/html:*.i:GZIP:1209600
Description: Add and enable a new INTEGRAL program handler for all websites served by INTEGRAL Web Server. Use "text/html" as the default MIME type when serving the output of any programs with .i extension. Deliver such output compressed in gzip format and set max-age in Cache-Control HTTP header to 1209600 seconds (or 2 weeks).
Example 1b
!MIMETYPE_INTEGRAL_NONE_EXCEPT[]=text/html:*.i:GZIP:1209600
Description: Add a new INTEGRAL program handler but don't enable it for any website served by INTEGRAL Web Server. Use "text/html" as the default MIME type when serving the output of any programs with .i extension. Deliver those files compressed in gzip format and set max-age in Cache-Control HTTP header to 1209600 seconds (or 2 weeks). Note that INTEGRAL Web Server will not be able to serve any INTEGRAL program output if the handler is set up exactly as shown here (i.e. without any exception sites). However, as soon as the first exception site is included within the square brackets, the delivery specification after the equal sign will become relevant and effective.
Example 2a
!MIMETYPE_INTEGRAL_ALL_EXCEPT[]=text/html:*.i:PASS
Description: Same as Example 1a except that the output is not additionally compressed and the max-age directive is not specified (and therefore not sent as part of the Cache-Control HTTP header).
Example 2b
!MIMETYPE_INTEGRAL_NONE_EXCEPT[]=text/html:*.i:PASS
Description: Same as Example 1b except that the output is not additionally compressed and the max-age directive is not specified (and therefore not sent as part of the Cache-Control HTTP header).
Example 3a
!MIMETYPE_INTEGRAL_ALL_EXCEPT[10,11,12]=text/html:*.i:GZIP:1209600
Description: Same as Example 1a except that the INTEGRAL program handler is not enabled for websites #10, #11 and #12.
Example 3b
!MIMETYPE_INTEGRAL_NONE_EXCEPT[10,11,12]=text/html:*.i:GZIP:1209600
Description: Same as Example 1b except that the INTEGRAL program handler is only enabled for websites #10, #11 and #12.
Example 4a
!MIMETYPE_INTEGRAL_ALL_EXCEPT[10,11,12]=text/html:*.i:PASS
Description: Same as Example 2a except that the INTEGRAL program handler is not enabled for websites #10, #11 and #12.
Example 4b
!MIMETYPE_INTEGRAL_NONE_EXCEPT[10,11,12]=text/html:*.i:PASS
Description: Same as Example 2b except that the INTEGRAL program handler is only enabled for websites #10, #11 and #12.